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
Explain some of the major built-in objects in asp.net
How do you store a value in viewstate and retrieve them?
What symbol would you use to denote, the start of a code block in aspx views?
What are the different authentication modes in asp.net?
what are the ihttphandler and ihttphandlerfactory interfaces ?
Disable Mouse right click on web page in asp.net?
What is Web Server Control Templates.?
What are the various types of cookies in asp.net?
How to make sure that contents of an updatepanel update only when a partial postback takes place (and not on a full postback)?
What is windows active directory authentication?
What is an example of an application service provider?
How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.
What is a 1x1 pixel?
Define the term Scavenging in Caching?
Will session work if cookies is disabled?