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 .net gurus. plz if any one has dumps on 70-631 and 70-541 on windows sharepoint services kindly mail me.

0 Answers  


2. Why did you choose this career?

2 Answers   Schwartz Oil, Swatz Oils,


Describe session handling in a webfarm?

0 Answers  


What are the main components of the ADO object model? How are they used?

2 Answers   HCL, Syntax Softtech,


How to Insert/Add in ASPXgridview

0 Answers   Infosys,






Difference between DataView and DataTable

4 Answers  


Is it possible to perform data validations in the database?

1 Answers   Quest,


What is asp.net caching?

0 Answers  


Can we set master page as a start page?

0 Answers  


How do you secure your connection string information?

0 Answers  


Explain form level validation and field level validation?

0 Answers  


What is the differences between a primary key and a unique key in sql server?

0 Answers  


Categories