|
Post by Admin on Mar 16, 2014 17:47:29 GMT
A Data grid, Datalist and Repeater are all ASP.NET data Web controls. They have many things in common like Data Source Property, Data Bind Method ItemDataBound, and Item Created. When you assign the Data Source Property of a Data grid to a Dataset then each Data Row present in the Data Row Collection of Data Table is assigned to a corresponding DataGridItem and this is same for the rest of the two controls. However, The HTML code generated for a Data grid has an HTML TABLE <ROW> element created for the particular Data Row and it is a Table form representation with Columns and Rows.For a Datalist it is an Array of Rows and based on the Template Selected and the Repeat Column Property value we can specify how many Data Source records should appear per HTML <table> row. In short, in data grid, we have one record per row, but in data list, we can have five or six rows per row. For a Repeater Control, the Data records to be displayed depend upon the Templates specified and the only HTML generated is the due to the Templates. In addition to these, Data grid has a in-built support for Sort, Filter and paging the Data, which is not possible when using a Data List and for a Repeater Control we would require to write an explicit code to do paging.
|
|