Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Data grid

This is a discussion on Data grid within the ASP forums, part of the Programming Talk category; What is the difference between data-grid and data list? http://www.careerbharat.com...

  1. #1
    careerbharat is offline Junior Member Array
    Join Date
    Aug 2006
    Answers
    1

    Question Data grid

    What is the difference between data-grid and data list?

    http://www.careerbharat.com


  2. #2
    nskr10 is offline Junior Member Array
    Join Date
    Oct 2006
    Answers
    2
    hi,

    Datagrid will show everything in table format (i.e; rows and columns). But Data list will show everything in a list format.

    check this site for more info.

    The ASP Column: DataList vs. DataGrid in ASP.NET -- MSDN Magazine, December 2001

    NSKR


  3. #3
    Adrian is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    The DataGrid Web control was designed to display data in an HTML <table>. Each row in the DataGrid's DataSource is displayed as a row in the HTML <table>. The DataGrid has an AutoGenerateColumns property, which can be set to either True or False. If AutoGenerateColumns is set to True (the default), each field in the DataSource is displayed as a column in the resulting
    HTML <table>. If, however, AutoGenerateColumns is set to False, then the developer must explicitly specify what columns should appear.
    One downside of a DataGrid is its rather "blocky" display. That is, the DataGrid displays each DataSource record as a row in an HTML <table>, and each field as a column in said table.

    The DataList Web control is useful for displaying data that can be highly customized in its layout. By default, the DataList displays its data in an HTML <table>. However, unlike the DataGrid, with the DataList you can specify via the RepeatColumns how many DataSource records should appear per HTML <table> row. The DataList is capable of performing sorting, paging, and editing of its data, but to do so requires quite a bit more programming than to accomplish these tasks with the DataGrid. Therefore, if you know you will be needing these functionalities, it is likely best to proceed with the DataGrid. If, however, you will not need these functionalities, but do necessarily need the extra control over the formatting, consider a DataList.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...