Class CategoryDataSource
Provides Category data to DataBoundControl implementations.
Inheritance
System.Object
CategoryDataSource
Inherited Members
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.Web.WebControls.dll
Version: 11.20.7Syntax
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 |
Overrides
EPiServer.Web.WebControls.GenericDataSource<EPiServer.DataAbstraction.Category, EPiServer.DataAbstraction.CategoryCollection, System.Int32>.CreateItem(System.Collections.Generic.List<EPiServer.DataAbstraction.Category>)
DeleteItem(Category)
Declaration
protected override void DeleteItem(Category item)
Parameters
Type | Name | Description |
---|---|---|
Category | item |
Overrides
EPiServer.Web.WebControls.GenericDataSource<EPiServer.DataAbstraction.Category, EPiServer.DataAbstraction.CategoryCollection, System.Int32>.DeleteItem(EPiServer.DataAbstraction.Category)
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> |
Overrides
EPiServer.Web.WebControls.GenericDataSource<EPiServer.DataAbstraction.Category, EPiServer.DataAbstraction.CategoryCollection, System.Int32>.ListItems()
LoadItem(Int32)
Declaration
protected override Category LoadItem(int key)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | key |
Returns
Type | Description |
---|---|
Category |
Overrides
EPiServer.Web.WebControls.GenericDataSource<EPiServer.DataAbstraction.Category, EPiServer.DataAbstraction.CategoryCollection, System.Int32>.LoadItem(System.Int32)
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 |
Overrides
EPiServer.Web.WebControls.GenericDataSource<EPiServer.DataAbstraction.Category, EPiServer.DataAbstraction.CategoryCollection, System.Int32>.SaveItem(EPiServer.DataAbstraction.Category)
SetupParameters(IDictionary)
Declaration
protected override void SetupParameters(IDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IDictionary | values |
Overrides
EPiServer.Web.WebControls.GenericDataSource<EPiServer.DataAbstraction.Category, EPiServer.DataAbstraction.CategoryCollection, System.Int32>.SetupParameters(System.Collections.IDictionary)
Implements
System.Web.UI.IHierarchicalDataSource