Data List
Header Template
Item Template
Alternating Item Template
Separator Template Item
Template
Selected Item Template
Edit Item Template
Footer Template
Each Template is provided with Style
Header Template Header Style
Item Template Item Style
These 2 provide built in formatting features means font
size,backgrounds colors.
It comes with 2 properties as Repeat Direction and Repeat
Columns.
Steps to customize the
datagrid control
After assigning the dataset and the datamember to
the datalist control.
Right click on the dataset control and select the edit
template item templates.
Place the controls as per the requirement on the item
Template.
– For e.g.: Place 2 labels and one checkbox at the
item template.
Set the following properties for the controls placed on
the itemTemplate.
– Id specify the identifier for the control
– Databindings
Text container.dataitem.columnName
Steps to customize the
datagrid control
DataBindings
Text Container
DataItem
Empno
After Setting the id and Databindings property for all the controls
then right click on the datalist control and click on End Template
Editing.
[Optional]: for better look and feel right click and select autoformat
Note in order to search for a control
present in datalist control
Syntax
datalistitem.FindControl(“ControlName”)