1.

Difference Between Datagrid, Datalist And Repeater.?

Answer»

Similarities:

They are all ASP.NET DATA Web controls.

They have common properties like: 

  1. DataSource Property
  2. DataBind Method
  3. ItemDataBound
  4. ItemCreated

When the DataSource Property of a Datagrid is assigned to a DataSet then each DataRow present in the DataRow Collection of DataTable is assigned to a corresponding DataGridItem.

Difference:

Datagrid: 

The HTML code generated has an HTML TABLE element created for the particular DataRow and is a tabular representation with Columns and Rows. Datagrid has a in-built support for Sort, Filter and paging the Data. 

Datalist: 

An Array of Rows and based on the TEMPLATE Selected and the RepeatColumn Property value The NUMBER DataSource records that appear per HTML

Repeater Control:

The Datarecords to be displayed depend upon the Templates SPECIFIED and the only HTML generated accordingly. Repeater does not have in-built support for Sort, Filter and paging the Data.

Similarities:

They are all ASP.NET data Web controls.

They have common properties like: 

When the DataSource Property of a Datagrid is assigned to a DataSet then each DataRow present in the DataRow Collection of DataTable is assigned to a corresponding DataGridItem.

Difference:

Datagrid: 

The HTML code generated has an HTML TABLE element created for the particular DataRow and is a tabular representation with Columns and Rows. Datagrid has a in-built support for Sort, Filter and paging the Data. 

Datalist: 

An Array of Rows and based on the Template Selected and the RepeatColumn Property value The number DataSource records that appear per HTML

Repeater Control:

The Datarecords to be displayed depend upon the Templates specified and the only HTML generated accordingly. Repeater does not have in-built support for Sort, Filter and paging the Data.



Discussion

No Comment Found