Comparing ListView with GridView,DataList and Repeater

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

From what i have seen, 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 new DataPager control.
  3. Support data grouping (repeating items) in a flexible way.
  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

* Supported: means that it's provided out of the box without any custom code or hacks.

* Not Supported: means that it's not provided out of the box by the control but it could be possible to implement it using custom code \ hacks.

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.

 

Anas Ghanem

Published Saturday, September 06, 2008 4:02 PM by anas
Filed under:

Comments

# funny wallpaper » Comparing ListView with GridView,DataList and Repeater

Pingback from  funny wallpaper » Comparing ListView with GridView,DataList and Repeater

# re: Comparing ListView with GridView,DataList and Repeater

Monday, September 08, 2008 12:39 AM by kamii47

Nice One,

It could be nice if there could be a column for Sort is also included so that we can guess what about support of sorting in each type control

# re: Comparing ListView with GridView,DataList and Repeater

Monday, September 08, 2008 2:12 PM by anas

kamii47

>>"It could be nice if there could be a column for Sort "

Thanks , I added the sorting to the  table .

# Creating a databound grid view control from a sample wireframe table

Wednesday, October 15, 2008 6:33 PM by Knowledge Capsules

Creating a databound grid view control from a sample wireframe table

# re: Comparing ListView with GridView,DataList and Repeater

Monday, October 20, 2008 5:39 AM by Amara

Nice article

# re: Comparing ListView with GridView,DataList and Repeater

Thursday, October 23, 2008 4:21 PM by fr3dr1k

Is the data grouping like a nested control?

# re: Comparing ListView with GridView,DataList and Repeater

Saturday, November 15, 2008 12:11 PM by Richard Waddell

Nice, just what I was looking for.

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, March 18, 2009 9:04 AM by maifs

nice work.

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, March 18, 2009 9:30 AM by maifs

very nice

# re: Comparing ListView with GridView,DataList and Repeater

Thursday, July 02, 2009 6:16 AM by Priyanka

Nice one

# re: Comparing ListView with GridView,DataList and Repeater

Monday, August 10, 2009 12:43 AM by cyan

nice,thanks

# re: Comparing ListView with GridView,DataList and Repeater

Thursday, October 08, 2009 6:30 AM by Rohit

Wonderful.

# re: Comparing ListView with GridView,DataList and Repeater

Saturday, October 17, 2009 4:12 PM by exsl

Thanks, this is a very useful overview.

# re: Comparing ListView with GridView,DataList and Repeater

Sunday, October 25, 2009 11:14 PM by OldGuyScott

Excellent information, thanks very much!

# re: Comparing ListView with GridView,DataList and Repeater

Monday, December 28, 2009 4:35 AM by Stéphane

Thank you very much for your very helpful article

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, February 24, 2010 12:23 PM by Mercury

Just what I was looking for! THANKS!!!!

# re: Comparing ListView with GridView,DataList and Repeater

Thursday, April 22, 2010 5:37 PM by TheRage3K

Simple, and effective.  Many thanks.

# Listview Features,Compare http://weblogs.asp.net/anasghanem/archive/2008/09/06/comparing-listview-with-gridview-datalist-and-repeater.aspx

Thursday, July 01, 2010 3:23 AM by Twitter Mirror

Listview Features,Compare http://weblogs. asp.net /anasghanem/archive/2008/09/06/comparing-listview-with

# Twitter Trackbacks for Comparing ListView with GridView,DataList and Repeater - Anas Ghanem [asp.net] on Topsy.com

Pingback from  Twitter Trackbacks for                 Comparing ListView with GridView,DataList and Repeater - Anas Ghanem         [asp.net]        on Topsy.com

# re: Comparing ListView with GridView,DataList and Repeater

Tuesday, July 27, 2010 1:39 PM by vikram

Best article I could find after a long search.

# re: Comparing ListView with GridView,DataList and Repeater

Tuesday, September 07, 2010 5:05 AM by chandradev1

Excellent article.

# re: Comparing ListView with GridView,DataList and Repeater

Tuesday, October 26, 2010 5:13 AM by dodul

Nice job.

would be better if u might hv delved deep and have elaborated.

Thank you.

Azhar rizvi

crackingsilence.blogspot.com

# re: Comparing ListView with GridView,DataList and Repeater

Monday, December 13, 2010 2:27 PM by Pierre

Simple, useful and Not Microsoft

# re: Comparing ListView with GridView,DataList and Repeater

Monday, December 20, 2010 2:21 AM by Excellent information, thanks very much

Excellent information, thanks very much

# Samantha Neilen » Blog Archive » Showing editable lists with the ASP.NET Repeater control

Pingback from  Samantha Neilen  » Blog Archive   » Showing editable lists with the ASP.NET Repeater control

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, February 09, 2011 2:27 AM by bani

nice topic

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, March 16, 2011 2:13 AM by CNU

Nice article with explanation of each one. thnk U.

# re: Comparing ListView with GridView,DataList and Repeater

Friday, April 01, 2011 5:27 AM by jayita

It is nice

# Comparing ListView with GridView,DataList and Repeater « Kaidanov Tzvi Gregory Technical Issues & Solutions

Pingback from  Comparing ListView with GridView,DataList and Repeater « Kaidanov Tzvi Gregory Technical Issues & Solutions

# Comparing ListView with GridView,DataList and Repeater « Kaidanov Tzvi Gregory Technical Issues & Solutions

Pingback from  Comparing ListView with GridView,DataList and Repeater « Kaidanov Tzvi Gregory Technical Issues & Solutions

# re: Comparing ListView with GridView,DataList and Repeater

Tuesday, June 21, 2011 3:56 AM by net fan

Thanks

# Gridview datalist | Goldencove

Friday, July 22, 2011 9:35 PM by Gridview datalist | Goldencove

Pingback from  Gridview datalist | Goldencove

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, August 03, 2011 6:24 AM by BIJAY KUMAR

ya,Way of the answer is very good, i like it.

every person wants to see output/Results like this.

# In asp.net , what is the difference between gridview and repeater controls - Programmers Goodies

Pingback from  In asp.net , what is the difference between gridview and repeater controls - Programmers Goodies

# In asp.net , what is the difference between gridview and repeater controls - Programmers Goodies

Pingback from  In asp.net , what is the difference between gridview and repeater controls - Programmers Goodies

# Gridview datalist | Farestrans

Sunday, September 11, 2011 3:29 PM by Gridview datalist | Farestrans

Pingback from  Gridview datalist | Farestrans

# re: Comparing ListView with GridView,DataList and Repeater

Monday, October 03, 2011 1:36 AM by vishal patwardhan

Good One.

# Usage the Listview over the gridview - Programmers Goodies

Wednesday, October 05, 2011 3:05 PM by Usage the Listview over the gridview - Programmers Goodies

Pingback from  Usage the Listview over the gridview - Programmers Goodies

# re: Comparing ListView with GridView,DataList and Repeater

Wednesday, October 12, 2011 1:36 AM by samina

very good explanation

# re: Comparing ListView with GridView,DataList and Repeater

Friday, November 11, 2011 3:39 AM by notandrewturvil

I've written a longish blog comparing the various data controls in ASP.NET 4.0 at www.wiseowl.co.uk/.../asp-net-data-controls.htm, if that helps.

# re: Comparing ListView with GridView,DataList and Repeater

Thursday, January 05, 2012 11:50 PM by Changhee Park

It is very helpful. Thanks

# re: Comparing ListView with GridView,DataList and Repeater

Monday, January 09, 2012 9:00 PM by sourabh

It is called the perfect answer .i was looking for...Highly appreciated

Leave a Comment

(required) 
(required) 
(optional)
(required)