WHAT ARE DEFFERENCE BETWEEN DATALIST AND DATAGRID



WHAT ARE DEFFERENCE BETWEEN DATALIST AND DATAGRID..

Answer / amit das

A Datagrid, Datalist are ASP.NET data Web controls.

They have many things in common like DataSource Property ,
DataBind Method ItemDataBound and ItemCreated .

When you assign the DataSource Property of a Datagrid to a
DataSet then each DataRow present in the DataRow Collection
of DataTable is assigned to a corresponding DataGridItem
and this is same for the rest of the two controls also.

But The HTML code generated for a Datagrid has an HTML
TABLE <ROW> element created for the particular DataRow and
its a Table form representation with Columns and Rows.

For a Datalist its an Array of Rows and based on the
Template Selected and the RepeatColumn Property value We
can specify how many DataSource records should appear per
HTML <table> row.


In addition to these , Datagrid has a inbuild support for
Sort,Filter and paging the Data ,which is not possible when
using a DataList and for a Repeater Control we would
require to write an explicit code to do paging.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

Hi..I have created a website in Asp.net with C# i want to add Chinese language in my website..could any body tell me that how can i add dynamically this language on user's request...??? thanks n advance...

1 Answers  


Can we have 2 web config files?

0 Answers  


Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?

0 Answers  


What is latest version of asp.net mvc? : Asp.Net MVC

0 Answers  


what is cross page posting

3 Answers  






Where web.config file is used?

0 Answers   HCL,


What is viewstate information stored?

0 Answers  


Explain the benefits of viewstate?

0 Answers  


In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely

0 Answers   Quest,


what is synchronization and asynchronization. what are the difference between two?

1 Answers   TCS,


About CLS and CTS ?

3 Answers   Microsoft,


What is Auto-event wireup? what is the default value for this? when u change the value what will happen?

1 Answers   CMC,


Categories