{"id":1178,"date":"2010-10-01T13:51:41","date_gmt":"2010-10-01T08:21:41","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1178"},"modified":"2010-10-01T13:51:41","modified_gmt":"2010-10-01T08:21:41","slug":"datagrid-gridview-datalist-and-repeater-control-in-asp-net","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/datagrid-gridview-datalist-and-repeater-control-in-asp-net\/","title":{"rendered":"DataGrid, GridView, DataList and Repeater Control in ASP.net"},"content":{"rendered":"<p>In Previous articles, i have written article about DataGrid.<\/p>\n<p><a href=\"https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-part-1\/\">https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-part-1\/<\/a><\/p>\n<p><a href=\"https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-sorting-%E2%80%93-part-2\/\">https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-sorting-%E2%80%93-part-2\/<\/a><\/p>\n<p><a href=\"https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/asp-net-datagrid-basic-questions\/\">https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/asp-net-datagrid-basic-questions\/<\/a><\/p>\n<p><strong>DataGrid<\/strong>, <strong>GridView <\/strong>and <strong>DataList <\/strong>controls are derived from the WebControl class, while the <strong>Repeater <\/strong>control is derived from the Control class. The WebControl class contains a number of properties, such as BackColor, ForeColor, CssClass, BorderStyle and so on.<br \/>\nIn ASP .NET basically there are four kinds of the Data Presentation Controls.<\/p>\n<ul>\n<li>GridView (more options)<\/li>\n<li>DataGrid<\/li>\n<li>DataList<\/li>\n<li>Repeater (less options)<\/li>\n<\/ul>\n<p>List of different abilities of Repeater Control, Datalist Control and GridView Control\u00a0features.<\/p>\n<p><!--more--><\/p>\n<p><strong>Features\u00a0of a GridView and DataGrid:<\/strong><\/p>\n<ol>\n<li>Displays data as a table<\/li>\n<li>Updateable<\/li>\n<li>Item as row<\/li>\n<li>Control over<\/li>\n<\/ol>\n<ul>\n<li>Alternate item<\/li>\n<li>Header<\/li>\n<li>Footer<\/li>\n<li>Colors, font, borders, etc.<\/li>\n<li>Paging<\/li>\n<\/ul>\n<p><strong>Features\u00a0of Repeater:<\/strong><\/p>\n<ol>\n<li>List format<\/li>\n<li>No default output<\/li>\n<li>More control<\/li>\n<li>More complexity<\/li>\n<li>Item as row<\/li>\n<li>Not updateable<\/li>\n<\/ol>\n<p><strong>Features\u00a0of DataList:<\/strong><\/p>\n<ol>\n<li>Directional rendering<\/li>\n<li>Good for columns<\/li>\n<li>Item as cell<\/li>\n<li>Alternate item<\/li>\n<li>Updateable<\/li>\n<\/ol>\n<p><strong>Difference between GridView, Datagrid, DataList and Data Repeater:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/05yye6k9.aspx\" target=\"_blank\">Please visit here, to get difference between Gridview and DataGrid.<\/a><\/li>\n<li>Datagrid has paging while Datalist doesnt.<\/li>\n<li>Datalist has a property called repeat. Direction = vertical\/horizontal. (This is of great help in designing layouts). This is not there in Datagrid.<\/li>\n<li>A repeater is used when more intimate control over html generation is required.<\/li>\n<li>When only checkboxes\/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than a Datagrid.<\/li>\n<\/ul>\n<p>The Repeater repeats a layout of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very\u00a0little\u00a0control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you&#8217;re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have\u00a0little\u00a0contro, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DataGrid, GridView, DataList and Repeater Control in ASP.net<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[21],"tags":[43,71],"class_list":["post-1178","post","type-post","status-publish","format-standard","hentry","category-net","tag-asp-net","tag-datagrid"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":188,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/asp-net-datagrid-basic-questions\/","url_meta":{"origin":1178,"position":0},"title":"ASP.NET DataGrid basic questions","author":"Jitendra","date":"May 18, 2010","format":false,"excerpt":"What is datagrid? The DataGrid Web server control is a powerful tool for displaying information from a data source. It is easy to use; you can display editable data in a professional-looking grid by setting only a few properties. At the same time, the grid has a sophisticated object model\u2026","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":227,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-sorting-part-2\/","url_meta":{"origin":1178,"position":1},"title":"DataGrid Sorting and Paging Example \u2013 Part 2","author":"Jitendra","date":"May 18, 2010","format":false,"excerpt":"For Part 1, visit This URL\u00a0https:\/\/jitendrazaa.com\/blog\/?p=191 In this part, i will show that how to Sort the Datagrid Component of ASP.NET. To sort Datagrid, we will need DataView and then assign Dataview as datasource to our Grid control. We will need to change our code of Part 1. Previously, we\u2026","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/05\/Sorting1.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":191,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-part-1\/","url_meta":{"origin":1178,"position":2},"title":"DataGrid Example &#8211; Part 1","author":"Jitendra","date":"May 18, 2010","format":false,"excerpt":"For the basics of DataGrid please refer this post: https:\/\/jitendrazaa.com\/blog\/?p=188 In this example, i will explain the basics of DataGrid control like Theming, Databinding etc. We will start our example with creating the SQL Express database of Employee which will contain the following fields : Id, FName, LName, Email. Now\u2026","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/05\/Employee.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":790,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/row-expand-collapse-using-jquery-and-ajax\/","url_meta":{"origin":1178,"position":3},"title":"Row expand collapse using jquery and Ajax","author":"Jitendra","date":"August 19, 2010","format":false,"excerpt":"Using JQuery and Ajax to expand and collapse the row in ASP.NET","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"Ajax JQuery Row Expand Collapse","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/08\/rowexpand-300x203.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":5389,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/responsive-datagrid-component-in-lightning-basics\/","url_meta":{"origin":1178,"position":4},"title":"Responsive Datagrid component in Lightning &#8211; Basics","author":"Jitendra","date":"March 15, 2016","format":false,"excerpt":"This blog post explains simple use case of Nested Lightning Component. It goes through example on how to interact and combine nested components to be used in parent Lightning component.","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Using Nested Lightning component to create responsive DataGrid","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/03\/Lightning-Data-Grid-1.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/03\/Lightning-Data-Grid-1.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/03\/Lightning-Data-Grid-1.gif?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5970,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/generic-and-responsive-table-component-in-salesforce-lightning\/","url_meta":{"origin":1178,"position":5},"title":"Generic and Responsive Table Component in Salesforce Lightning","author":"Jitendra","date":"March 31, 2017","format":false,"excerpt":"Complete Source code to create generic and responsive Table component in Salesforce Lightning","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"JSON format for responsive datagrid Lightning component","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/03\/JSON-format-for-responsive-datagrid-Lightning-component.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1178"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1178\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}