In this article I'm trying to explain what is ListView control, what is the Use of ListView Controller. How it works and How to bind data ListView. What are the different types of templates include in that.?
ListView is the new control and it's available from FrameWork 3.5 onwords. It is used to display table format of data, the difference between other controls and ListView control is we can create Template based layouts in ListView but using other controls we can't do that. It gives any type of data like Columns (DataList) , Faster execution (Repeater) , Table format of data (GridView), inbuilt insertion (FormView)option.
Which is Richest Control:
ListView is the Richest Control not GridView. Why because GridView give only table format of data but listview give any type of output like DataList,Repeater,GridView,FormView...
Templates to Design a page:
There are several templates to design a page in that we discuss few points
It is used to give header of the control. Normally for GridView and other control to display header we use HeaderTemplate but in ListView using LayoutTemplate we give Header.
It is used to display the content of the page.
Using this template we give some styles for Alternating rows.
Using this control we give pagging to the control.
- Built in support for Sorting
- Built in support for insertion.
- Display any format of data.
- We can define our own Template / Layouts.
- We can Edit,Delete,Update the records same like other controls.
Using ListView control we can display any format of Data. This is great approach to do any format of output. Using this control we do sorting, Inserting, Pagging and everything. This is the Richest control.