Results 1 to 4 of 4

Thread: [02/03] Enumurate rows of Datagrid

  1. #1

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Thumbs up [02/03] Enumurate rows of Datagrid

    Hi all ,

    I am using Asp.Net 1.1.. How can Enumurate all the rows in a datagrid ? .This works in 2.0. But what about 1.1
    Code:
    For each  Row  as GridViewRow in GridView1.Rows          
              Next Row

  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: [02/03] Enumurate rows of Datagrid

    vb.net Code:
    1. For Each row As DataGridItem In DataGrid1.Items
    2.  
    3. ' your code
    4.  
    5. Next row
    Show Appreciation. Rate Posts.

  3. #3

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: [02/03] Enumurate rows of Datagrid

    Thanks HarshGupta,
    I am modifying this.. But in this (Listing 4), the are getting the row index.How can I get that one ?

    Dana

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: [02/03] Enumurate rows of Datagrid

    The difference between GridView and DataGrid for representation of rows is that GV calls it Row(s) and DG calls it Item(s).

    So, RowIndex in gridview is ItemIndex in datagrid, RowType in gridview is ItemType in datagrid.

    So, it will be row.ItemIndex to get index current row being processed.
    Show Appreciation. Rate Posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width