Last post Sep 10, 2011 02:55 AM by PNasser
Sep 10, 2011 02:51 AM|amrizvi|LINK
Kindly explain the difference in features of ListView and GridView Class as both have built-in Editing, Deleting, Updating, Insert and Paging Sorting and customizing template Features.
And If both are same in General then which is having more features or more advanced.
Thanks in Advance
Sep 10, 2011 02:55 AM|PNasser|LINK
Taken from: http://forums.asp.net/post/2420813.aspx
check out the MSDN description. ListView resembles GridView; but difference is that you can set custom templates to show, edit, delete, update, insert and sort data.
The ListView control is used to display the values from a data source. It resembles theGridView
control, except that it displays data by using user-defined templates instead of row fields. Creating your own templates gives you more flexibility in controlling how the data is displayed.
The ListView control supports the following features:
Support for binding to data source controls such as
Customizable appearance through user-defined templates and styles.
Built-in sorting capabilities.
Built-in update and delete capabilities.
Built-in insert capabilities.
Support for paging capabilities by using a
Built-in item selection capabilities.
Programmatic access to the ListView object model to dynamically set properties, handle events, and so on.
Multiple key fields.
MSDN Referenced Link >
ListView Class (System.Web.UI.WebControls)
GridView Class (System.Web.UI.WebControls)
GridView Displays the values of a data source in a table where each column represents a field and each row represents a record. TheGridView control enables you to select, sort, and edit these items.
The GridView control is used to display the values of a data source in a table. Each column represents a field, while each row represents a record. TheGridView control supports the following features:
Binding to data source controls, such as
Built-in sort capabilities.
Built-in paging capabilities.
Built-in row selection capabilities.
Programmatic access to the GridView object model to dynamically set properties, handle events, and so on.
Multiple data fields for the hyperlink columns.
Customizable appearance through themes and styles.
To learn about the other data-bound controls that are available in ASP.NET, seeASP.NET Data-Bound Web Server Controls Overview.