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

What's the use of formatters in .net?

645


How do active server pages work?

628


What does the hotspot class in .net do?

651


What are the advantages of asp.net?

629


What is simple data binding?

626






What is dynamic web page with example?

606


What are sessions and cookies?

652


how to include timer or counting time to display next page in asp.net

1707


What is the difference between abstract class vs interface? Can give me the real time examples?

562


What is the difference between sealed vs static class?

662


What is application state?

595


What is http pipeline in asp.net?

604


Explain how do you validate the controls in an asp .net page?

608


What is state management technique?

632


Is asp.net a programming language or framework?

660