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
keysIEnumerable<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
keyint- Key to reset
CopyTo(GridRow, int)
Copies the row to the page with the specified Id.
public GridRow CopyTo(GridRow row, int pageId)
Parameters
Returns
DeleteGridRow(int)
public bool DeleteGridRow(int id)
Parameters
idint
Returns
DeleteGridRows(IEnumerable<int>)
public bool DeleteGridRows(IEnumerable<int> ids)
Parameters
idsIEnumerable<int>
Returns
GetCache(IEnumerable<int>)
public IEnumerable<GridRow> GetCache(IEnumerable<int> keys)
Parameters
keysIEnumerable<int>
Returns
GetCache(int)
public GridRow GetCache(int key)
Parameters
keyint
Returns
GetGridRowById(int)
public GridRow GetGridRowById(int rowId)
Parameters
rowIdint
Returns
GetGridRows()
public IEnumerable<GridRow> GetGridRows()
Returns
GetGridRowsByAreaId(int)
public IEnumerable<GridRow> GetGridRowsByAreaId(int areaId)
Parameters
areaIdint
Returns
GetGridRowsByPageId(int)
public IEnumerable<GridRow> GetGridRowsByPageId(int id)
Parameters
idint
Returns
GetGridRowsByPageId(int, bool)
public IEnumerable<GridRow> GetGridRowsByPageId(int id, bool onlyActive)
Parameters
Returns
GetLanguageVersions(GridRow)
Gets all language versions of the row
public IEnumerable<GridRow> GetLanguageVersions(GridRow gridRow)
Parameters
gridRowGridRow- 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
areaIdint- The area id.
Returns
- Page
- The grid row template folder
MoveTo(GridRow, int)
public GridRow MoveTo(GridRow row, int pageId)
Parameters
Returns
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
gridRowGridRow- The grid row to save as a template
namestring- The name of the new template
descriptionstring- A description of the template
imagestring- An image for the template
categorystring- A category of the template
Returns
- GridRow
- The grid row template
SaveGridRow(GridRow)
public bool SaveGridRow(GridRow gridRow)
Parameters
gridRowGridRow
Returns
SaveGridRows(IEnumerable<GridRow>)
public bool SaveGridRows(IEnumerable<GridRow> gridRows)
Parameters
gridRowsIEnumerable<GridRow>
Returns
SortGridRows(IEnumerable<GridRow>)
Sorts grid rows according to position in list.
public bool SortGridRows(IEnumerable<GridRow> gridRows)
Parameters
gridRowsIEnumerable<GridRow>- Grid rows.
Returns
SortGridRows(IEnumerable<int>)
Sorts grid rows according to position in list.
public bool SortGridRows(IEnumerable<int> rowOrder)
Parameters
rowOrderIEnumerable<int>- List of row ids. Position in list is used to set sort value.