Thursday, December 16, 2010

ListView Control in .Net 3.5

This is a powerful and most flexible databound control introduced in Asp.net 3.5. It has a lots of awesome features as compared to other databound controls.This controls contains functionality combined of all databound controls(DataGrid,GridView,DataList,Repeater).The most important feature of this control is that like the Repeater control it provides much more control over the layout of the output.

Templates:- List view control contain 11 Templates out of which 1- 6 templates are already existing in other databound controls. 7 - 11 are new templates introduced in this control.

Templates in List View
1. Item Template
2. Alternating Item Template
3. Edit Item Template
4. Insert Item Template
5. Selected Item Template
6. Empty Item Template
7. Layout Template
8. Group Template
9. Group Separator Template
10. Item Separator Template
11. Empty Data Template

compulsory Templates while using ListView:-
When we use list view control then it must contains the following templates rest templates are optional.

1. Layout Template

2. Item Template

How to bind a ListView Control

HTML Code













Class file Code (I bind ListView using LINQ)










This is just an Introduction to List View Control Soon I'll add more details about List View features and Functionalities.



Thanks & Regards,
Vikas Sharma


No comments:

Post a Comment