Class CategoryDataSource

Provides Category data to DataBoundControl implementations.

Inheritance
System.Object
CategoryDataSource
Implements
System.Web.UI.IHierarchicalDataSource
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.Web.WebControls.dll
Version: 8.11.0
Syntax
public class CategoryDataSource : GenericDataSource<Category, CategoryCollection, int>, IHierarchicalDataSource, IDataSourceMethods

Constructors

CategoryDataSource()

Declaration
public CategoryDataSource()

Properties

IncludeRootCategory

Gets or sets a value indicating whether to include the root category in the listing of categories. Default is to not include the root category.

Declaration
public bool IncludeRootCategory { get; set; }
Property Value
Type Description
System.Boolean

Methods

CreateItem(List<Category>)

Declaration
protected override Category CreateItem(List<Category> categories)
Parameters
Type Name Description
System.Collections.Generic.List<Category> categories
Returns
Type Description
Category

DeleteItem(Category)

Declaration
protected override void DeleteItem(Category item)
Parameters
Type Name Description
Category item

GetHierarchicalView(String)

Declaration
public HierarchicalDataSourceView GetHierarchicalView(string viewPath)
Parameters
Type Name Description
System.String viewPath
Returns
Type Description
System.Web.UI.HierarchicalDataSourceView

HierarchicalSelect(String)

Returns a category collection for the provided viewpath. If viewpath is null or an empty string the specified root category is selected.

Declaration
protected virtual CategoryCollection HierarchicalSelect(string ViewPath)
Parameters
Type Name Description
System.String ViewPath

a string representation of the category id

Returns
Type Description
CategoryCollection

a collection of categories

ListItems()

Declaration
protected override List<Category> ListItems()
Returns
Type Description
System.Collections.Generic.List<Category>

LoadItem(Int32)

Declaration
protected override Category LoadItem(int key)
Parameters
Type Name Description
System.Int32 key
Returns
Type Description
Category

OnDataSourceChanged(EventArgs)

Signals that the state of the DataSourceControl has changed so that bound controls can rebind.

Declaration
protected virtual void OnDataSourceChanged(EventArgs e)
Parameters
Type Name Description
System.EventArgs e

SaveItem(Category)

Declaration
protected override void SaveItem(Category item)
Parameters
Type Name Description
Category item

SetupParameters(IDictionary)

Declaration
protected override void SetupParameters(IDictionary values)
Parameters
Type Name Description
System.Collections.IDictionary values

Implements

System.Web.UI.IHierarchicalDataSource