Solved

Diff b/w Data\Grid, DataList & Repeater - Their Uses ?

Posted on 2011-03-09
6
393 Views
Last Modified: 2012-05-11
Hello Experts !

My Query: When to use DataGrid, DataList, Repeater in project ? I mean to say whats their individual differences and at what scenarios respective ones will be efficient ?

Any added information about them will be helpfull !

Thanx in advance !
0
Comment
Question by:mdkshah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:HSIHSA
ID: 35091996
Please go through this link, may be it will help in giving differences form the implementation point of view.

http://www.geekinterview.com/question_details/4560
0
 
LVL 10

Assisted Solution

by:Asim Nazir
Asim Nazir earned 250 total points
ID: 35092011
The DataGrid Web control provides the greatest feature set of the three data Web controls, with its ability to allow the end-user to sort, page, and edit its data. The DataGrid is also the simplest data Web control to get started with, as using it requires nothing more than adding a DataGrid to the Web page and writing a few lines of code. The ease of use and impressive features comes at a cost, though, namely that of performance: the DataGrid is the least efficient of the three data Web controls, especially when placed within a Web form.

With its templates, the DataList provides more control over the look and feel of the displayed data than the DataGrid. Using templates, however, typically requires more development time than using the DataGrid's column types. The DataList also supports inline editing of data, but requires a bit more work to implement than the DataGrid. Unfortunately, providing paging and sorting support in the DataList is not a trivial exercise. Making up for these lacking built-in features, the DataList offers better performance over the DataGrid.

Finally, the Repeater control allows for complete and total control of the rendered HTML markup. With the Repeater, the only HTML emitted are the values of the databinding statements in the templates along with the HTML markup specified in the templates—no "extra" HTML is emitted, as with the DataGrid and DataList. By requiring the developer to specify the complete generated HTML markup, the Repeater often requires the longest development time. Furthermore, the Repeater does not offer built-in editing, sorting, or paging support. However, the Repeater does boast the best performance of the three data Web controls. Its performance is comparable to the DataList's, but noticeably better than the DataGrid's.

0
 
LVL 9

Accepted Solution

by:
jkofte earned 250 total points
ID: 35092050
Data Grid: Forms a table and displays the data in it. Useful when you have to display information like an excel sheet on HTML. Also has paging.
The most complex of three.
Example: http://www.w3schools.com/browsers/browsers_stats.asp

Data List: When you have to repeat the data but display them on let's say three columns like the link below, use data list.
Not very complex but not as simple as repeater. Can use multiple columns.
Example: http://www.bestbuy.com/site/Electronics/TV-Video/abcat0100000.c?id=abcat0100000

Repeater: Simply repeats the data. When you need to display a single column repeating data, use repeater. It adds no HTML div or table or nothing, just repeats the HTML you put in your item template. Simplest of all three but the most customizable.
Example: Blogs, header, a picture if any and summary is displayed in the home pages of the blogs and it is repeated.
http://www.smashingmagazine.com/
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 8

Expert Comment

by:Anurag Agarwal
ID: 35092638
0
 

Author Comment

by:mdkshah
ID: 35103355
Thanx Experts 4 Ur Quick Response with Solutions. I'm Providing Multiple Solutions to this question, for both asimnazir123jkofte for providing the solution in thier own words which is easily understandable 2 all, instead of providing links.

Once again Thanx to all Experts 4 their Valuable time !

TakeCare..
0
 
LVL 8

Expert Comment

by:Anurag Agarwal
ID: 35110492
Although it doesn't matter but mdkshah if u had really gone thru that link it would have definately helped u by not only providing u with basic idea for what u were looking but also with some deep knowledge by which ur own concepts would have become more strong , I believe u must be running out of time due to ur daily business thts why u skipped it......... any ways thanks for the advice !!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question