what is the difference between Data list and Grid view
GridView
has much more bells and whistles than DataList
. The very basic difference is that you should write your own templates to use a DataList
. GridView
automatically provides you with a tabular data template and much more functionality out of the box. The rule of thumb is, use GridView
when it's what you need. Use DataList
, Repeater
and other more customizable controls when you're willing to customize them more radically.
A datalist is more for display data in different layouts like a corporate phonebook with images that you want to make the columns horizontal instead of vertical like a table format. The downside to a datalist is you can't edit the data easily meaning it can be done but you have to write your own procedures to do it. With a gridview it's all built in for editing.
Here's a good explanation of each of the data bound controls in .net
http://msdn.microsoft.com/en-us/library/ms228214(vs.80).aspx