Table of Contents

Class GridService

Namespace
Dynamicweb.Content
Assembly
Dynamicweb.dll
public class GridService : ICacheStorage<int, GridRow>, ICacheStorage<int>, ICacheStorage
Inheritance
GridService
Implements
Inherited Members

Methods

ClearCache()

Resets all keys to the default value for objects stored in the object cache

public void ClearCache()

ClearCache(IEnumerable<int>)

Resets the specified keys to the default value for objects stored in the object cache

public void ClearCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>

Keys to reset

ClearCache(int)

Resets the specified key to the default value for objects stored in the object cache

public void ClearCache(int key)

Parameters

key int

Key to reset

ClearTrashBin(int)

Deletes the row with the specified id form trashbin

public void ClearTrashBin(int id)

Parameters

id int

The id of the row to delete

Exceptions

ArgumentException

CopyTo(GridRow, int)

Copies the row to the page with the specified Id.

public GridRow CopyTo(GridRow row, int pageId)

Parameters

row GridRow

The row to copy.

pageId int

The page Id to copy the row to.

Returns

GridRow

DeleteGridRow(int)

public bool DeleteGridRow(int id)

Parameters

id int

Returns

bool

DeleteGridRows(IEnumerable<int>)

public bool DeleteGridRows(IEnumerable<int> ids)

Parameters

ids IEnumerable<int>

Returns

bool

GetCache(IEnumerable<int>)

public IEnumerable<GridRow> GetCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>

Returns

IEnumerable<GridRow>

GetCache(int)

public GridRow GetCache(int key)

Parameters

key int

Returns

GridRow

GetDeletedGridRows(int)

Gets the collection of deleted rows in specified area

public IEnumerable<GridRow> GetDeletedGridRows(int areaId)

Parameters

areaId int

The area id.

Returns

IEnumerable<GridRow>

A collection of rows

GetGridRowById(int)

public GridRow GetGridRowById(int rowId)

Parameters

rowId int

Returns

GridRow

GetGridRowDefinitionUsageInfo(GridRowDefinition)

Gets the list of using info of a GridRowDefinition

public IEnumerable<GridRowDefinitionUsageInfo> GetGridRowDefinitionUsageInfo(GridRowDefinition definition)

Parameters

definition GridRowDefinition

The grid row definition

Returns

IEnumerable<GridRowDefinitionUsageInfo>

GetGridRows()

public IEnumerable<GridRow> GetGridRows()

Returns

IEnumerable<GridRow>

GetGridRowsByAreaId(int)

public IEnumerable<GridRow> GetGridRowsByAreaId(int areaId)

Parameters

areaId int

Returns

IEnumerable<GridRow>

GetGridRowsByPageId(int)

public IEnumerable<GridRow> GetGridRowsByPageId(int id)

Parameters

id int

Returns

IEnumerable<GridRow>

GetGridRowsByPageId(int, bool)

public IEnumerable<GridRow> GetGridRowsByPageId(int id, bool onlyActive)

Parameters

id int
onlyActive bool

Returns

IEnumerable<GridRow>

GetLanguageVersions(GridRow)

Gets all language versions of the row

public IEnumerable<GridRow> GetLanguageVersions(GridRow gridRow)

Parameters

gridRow GridRow

The gridRow for which to get all its language versions

Returns

IEnumerable<GridRow>

A list of grid rows

GetTemplateParentPage(int)

Get row template folder

public Page GetTemplateParentPage(int areaId)

Parameters

areaId int

The area id.

Returns

Page

The grid row template folder

MoveTo(GridRow, int)

public GridRow MoveTo(GridRow row, int pageId)

Parameters

row GridRow
pageId int

Returns

GridRow

RestoreGridRow(int)

Restore the row with the specified id

public void RestoreGridRow(int id)

Parameters

id int

The id of the row to restore

Exceptions

ApplicationException

SaveAsTemplate(GridRow, string, string, string, string)

Saves the specified row as a template

public GridRow SaveAsTemplate(GridRow gridRow, string name, string description, string image, string category)

Parameters

gridRow GridRow

The grid row to save as a template

name string

The name of the new template

description string

A description of the template

image string

An image for the template

category string

A category of the template

Returns

GridRow

The grid row template

SaveGridRow(GridRow)

public bool SaveGridRow(GridRow gridRow)

Parameters

gridRow GridRow

Returns

bool

SaveGridRows(IEnumerable<GridRow>)

public bool SaveGridRows(IEnumerable<GridRow> gridRows)

Parameters

gridRows IEnumerable<GridRow>

Returns

bool

SortGridRows(IEnumerable<GridRow>)

Sorts grid rows according to position in list.

public bool SortGridRows(IEnumerable<GridRow> gridRows)

Parameters

gridRows IEnumerable<GridRow>

Grid rows.

Returns

bool

SortGridRows(IEnumerable<int>)

Sorts grid rows according to position in list.

public bool SortGridRows(IEnumerable<int> rowOrder)

Parameters

rowOrder IEnumerable<int>

List of row ids. Position in list is used to set sort value.

Returns

bool
To top