Wednesday, July 23, 2014

What’s difference between Datagrid, Datalist and repeater

A Datagrid, Datalist and Repeater are all 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 short in datagrid we have one record per row, but in
datalist we can have five or six rows per row.
For a Repeater Control, the Datarecords to be displayed depends upon the Templates
specified and the only HTML generated is the due to the Templates.
In addition to these, Datagrid has a in-built 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.

Related Posts:

  • How to import Excel data to MySql Table How to import Excel data to MySql Table in simple 3 steps Step 1: Save your excel sheet as a CSV by using “Save As” Step 2: Delete the header if you have in the CSV file Step 3: Open PhpMyAdmin and click on the t… Read More
  • Outlook Shortcurts Outlook Shortcuts Ctrl+R: reply to email Alt+R: reply to all in email or switch to the work week calendar view Alt+W: forward email or switch to the weekly calendar view Ctrl+M: F9 to Send/Receive all Alt+S… Read More
  • [Solved:] Chrome Tab Closes on Click Chrome tab closes when i click on it: I really tucked when it happened with me. I googled it but i didn't find exact solution. Then i analysed and found that it is the only problem with the chrome. I was not able to open se… Read More
  • Create great gallery design for your website quickly using Visual Light Box Need to create gallery for your website but can't write complex JQuery Code ?  No Worry, i will tell an easy way to do this. Here i am giving some simple steps where you can easily create beautiful gallery. Step 1: Dow… Read More
  • Networking Devices HUB Networks using a Star topology require a central point for the devices to connect. Originally this device was called a concentrator since it consolidated the cable runs from all network devices. The basic form of conce… Read More

0 comments:

Post a Comment