WHAT ARE DEFFERENCE BETWEEN DATALIST AND DATAGRID

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain culture and uiculture values.

534


What threading model used in asp and asp.net?

562


What is full form of asp.net?

508


What is the difference between response.redirect and server.transfer?

528


What are sessions and cookies?

558






Explain client side state management system.

557


What should you do is you want to remove an existing component but would like to make some funtionalities?

1472


What are the modes of updation in an updatepanel?

546


Is asp.net and .net are same or different?

513


What is difference between Fragment Caching and Page Caching in ASP.NET?

570


Contrast OOP and SOA. What are tenets of each ?

1731


Explain security types in asp.net?

533


What is the difference between web.config and machine.config in ASP.NET?

588


What is in a session cookie?

532


Securitywise What are the Enhancements in 2.0?

1475