|
-
Jan 17th, 2008, 07:01 AM
#1
[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
-
Jan 17th, 2008, 07:31 AM
#2
Re: [02/03] Enumurate rows of Datagrid
vb.net Code:
For Each row As DataGridItem In DataGrid1.Items ' your code Next row
-
Jan 17th, 2008, 07:39 AM
#3
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
-
Jan 17th, 2008, 07:53 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|