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

What is caching in asp.net?

0 Answers  


How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

0 Answers  


How do we sort the data from a dataset?

0 Answers  


What is difference between inproc and outproc?

0 Answers  


How do we make a poperty read only?

1 Answers   Microsoft,






What is the difference between login controls and forms authentication?

0 Answers  


Which object is used to encapsulate the state of the client and the browser in ASP.NET?

0 Answers   Sans Pareil IT Services,


To wrap up a call to a Web service the standard used is..?

0 Answers   Siebel,


What are different templates available in Repeater,DataList and Datagrid ?

1 Answers  


hi .net gurus. plz if any one has dumps on 70-631 and 70-541 on windows sharepoint services kindly mail me.

0 Answers  


What is the difference between cache and cookies?

0 Answers  


what is a virtual class?

1 Answers   Patni,


Categories