Comparing ListView with GridView,DataList and Repeater

 Rate It (2)

  The ListView control is a new data presentation control that was added to .Net 3.5 , you may wonder why its added to the framework , and what it provide .

The ListView control was added to provide The following functionalities :

  1. A very flexible and customizable layout.
  2. A built in data paging support with the DataPager control.
  3. support data grouping ( repeating items) .
  4. Built in support for deleting,inserting,paging,sorting,and updating the data.

Now , to compare the ListView control with the dataList,GridView and repeater control , lets look at the table below :


Supported Funcationalities
Control Paging Data Grouping Provide Flexible Layout Update,Delete Insert Sorting
ListView supported supported supported supported supported supported
GridView supported Not supported Not Supported supported Not Supported supported
DataList Not supported supported supported Not supported Not supported Not supported
Repeater Not supported Not supported supported Not supported Not supported Not supported


 The GridView : it supports paging but it doesn't provide a flexible layout , since its mainly used to display the data in a table based layout.And If we looked at data inserting , the Gridview doesn't have a built in support for inserting data( since it doesn't call the insert method of it underlying data source when you click on a button with a CommadName set to "Insert" ).

The DataList : it support data grouping ( through its RepeatColumns property) , but it doesn't have a built in support for paging,inserting ,deleting , updating the data. and if you looked at its laout , you will find that by default  the datalist renders as html table and you will have to set its flowLayout to "Flow" to stop that behaviour.

The Repeater control : you will find that it provides a flexible layout but it doesn't support data grouping ,inserting,deleting , updating  and paging through the data .

 

Summary :

The ListView control was added to provide a rich data control that can support all the required functionalities at the same time , so now you can easily display a fully customizable layout that supports Grouping,paging , inserting , deleting , updating and sorting the data.

 

Revision number 1, Monday, September 08, 2008 11:27:55 PM by anas

Comments

Related Articles

ListView

Some people think that the ListVew is a better Repeater and is one the best new additions to Visual Studio 2008. Blogs/Articles Using the ListView Control in ASP.NET 3.5: Mustafa Basgun has also written some great articles that drill into the new ListView

ASP.NET Controls - New in Version 3.5

Check out the Feature Specifications for Visual Studio 2008 and .NET Framework 3.5. These older documents give you an insight into what features made it (and didn't make it) into the Release. GridView- Take a look at all the articles that ScottGu has done

Data-centric UI Controls

Both the GridView and ListView are new Data Controls in Visual Studio 2008. Scott Guthrie has a great introduction that uses the ListView Control. He builds a product catalog from scratch with complete control over the CSS and HTML. Watch Kashif Alam's Webcast

Shortcuts

Table of Contents

Top Wiki Contributors

(last 30 days)

  1. mbanavige (5)
  2. SGWellens (4)
  3. maartenba (2)
  4. rami_nassar (2)
  5. stiansol (2)
  6. MisterFantastic (2)
  7. satish1.v (1)
  8. raklos (1)
  9. mosessaur (1)
  10. Jos Branders (1)

Advertise Here

Microsoft Communities
Page view counter