Last post Feb 09, 2010 02:26 PM by Careed
Feb 08, 2010 09:46 AM|bit2009|LINK
i want to create a custom datacontrol. how i can make available all those data properties like datasource,databind(),itemtemplete, all those events etc.
Feb 08, 2010 10:10 AM|Caspar Kleijne|LINK
Implement all related interfaces, apply all related attibutes and events.
(or simply derive from datalist, repeater or like that)
Feb 08, 2010 10:18 AM|Careed|LINK
The best way to start with a data custom control is to inherit the BaseDataBoundControl class. This will give you properties such as DataSource and DataSourceID and methods such as DataBind. As for ItemTemplate, you would either need to build your own,
or you could inherit from any of the existing controls that use. In other words, if what you want is to expand on the GridView control, then inherit from the GridView and then add on your new properties and methods and override the properties and methods
that you want to change from the GridView (noting you may not be able to override all methods and properties).
Feb 08, 2010 10:40 AM|bit2009|LINK
what is this two & how to access or use it ?
Feb 09, 2010 02:26 PM|Careed|LINK
WebCategory and WebSysDescription are internal classes inside System.Web and cannot be used outside of the base Framework library.
You can, however, use the CategoryAttribute class [Category("Layout")] which indicates the category group your control is in as it is displayed in the Properties box in Visual Studio, while the DescriptionAttribute class [Description("DataList_ExtractTemplateRows")]
is used to provide a description of your properties/methods within the Properties box.