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
Printable View
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
vb.net Code:
For Each row As DataGridItem In DataGrid1.Items ' your code Next row
Thanks HarshGupta,
I am modifying this.. But in this (Listing 4), the are getting the row index.How can I get that one ?
Dana
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.