GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  DotNet
Go To First  |  Previous Question  |  Next Question 
 DotNet  |  Question 91 of 165    Print  
Differences between Datagrid, Datalist and Repeater?
1. Datagrid has paging while Datalist doesnt.
2. Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid.
3. A repeater is used when more intimate control over html generation is required.
4. When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than a Datagrid.
The Repeater repeats a chunk of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very little control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you’re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have little contro, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default.
Out of the 3 controls, I use the Repeater the most due to its flexibility w/ HTML. Creating a Pagination scheme isn't that hard, so I rarely if ever use a DataGrid. Occasionally I like using a DataList because it allows me to easily list out my records in rows of three for instance.



  
Total Answers and Comments: 1 Last Update: January 13, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 13, 2006 05:10:26   #1  
samiksc Member Since: October 2005   Contribution: 233    

RE: Differences between Datagrid, Datalist and Repeate...

Datagrid is most restrictive as regards to customization followed by DataList and finally Repeater is the most customizable.

Datagrid has built in paging sorting and editing capabilities which are not there with the other two controls. So if you want users to sort / page / edit data datagrid is the natural choice.

DataList and repeater have better performance than datagrid. So if performance is a major concern for example a site with large number of concurrent visitors then you could think of datalist or repeater.

Repeater is the most customizable. It allows you to create structures like nested lists for example.

A datagrid row displays one record from the data source while a datalist row can display more than one records (set by RepeatColumns property)

Datagrid and Datalist are derived from WebControl while Repeater is not and so does not have the stylistic properties of web controls.

All are similar in that they have a datasource property and ItemCreated ItemDataBound and ItemCommand events.


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Server-side code: 1. Code is written in VB, C# or other compiled languages. 2. Code is executed by the server during a roundtrip in response to a user request or action. 3. The server executes server side code and returns HTML code to the client ...

Latest Answer : not possible but format can,.. ...

Latest Answer : ItemTemplate ...

Latest Answer : AlternatingItemTemplate Like the ItemTemplate element, but rendered for every otherrow (alternating items) in the Repeater control. You can specify a different appearancefor the AlternatingItemTemplate element by setting its style properties. ...

What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

Latest Answer : Set the AutoGeneratedColumn = fasle    //for bind columnhope it'll work 4 u. ...

Latest Answer : ButtonColumn is used to add link to datagrid. & set the ButtonType to LinkButton ...

Latest Answer : is the tag you usually use to add a bound column. You may also use to add a bound column to a datagrid. ...

Briefly explain what user controls are and what server controls are and the differences between the two.

Now VB.NET is object-oriented language. The following are some of the differences:Data Type Changes The .NET platform provides Common Type System to all the supported languages. This means that all 
Latest Answer : The big one is that VB (we are talking VB through VB6) is entirely in the COM world not the .Net world of managed code. VB generates either threaded P-code or native EXE, processed by the VB runtime,  but does not have concept of Release vs Debug. ...


 Sponsored Links

 
Related Articles

What are the differences between stored procedures and triggers?

Stored procedures are compiled collection of programs or SQL statements that live in the database. A stored procedure can access and modify data present in many tables. Also a stored procedure is not associated with any particular database object. But triggers are event-driven special procedures whi
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 

HR Interview - Telephone Interview Etiquette

Telephone Interview Etiquette When you conduct a telephone interview for a job it is important to show the proper etiquette Not only is it important it is critical is you wish to be hired by the company There are a number of things you will want to do and other things should never be done mosgoogle
 

HR Interview - How To Succeed At HR Interviews

How To Succeed At HR Interviews There are a number of things you will need to do in order to make sure you pass the interview process Your appearance is something that you will want to pay close attention to Even if you feel that your appearance shouldn t be a factor in whether or not you re highere
 

HR Interview - Do's and Dont's in a HR Interview

Do s and Dont s in a HR Interview There are a number of things that you will want to avoid during the HR interview process While some of these things are directed at the interviewer the other things are directed at the applicant If interviewers fail to follow the proper procedures throughout the int
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape