Hi,
I have to loop through each record in the Datagrid irrespective of the recordset.
Please help me.
Printable View
Hi,
I have to loop through each record in the Datagrid irrespective of the recordset.
Please help me.
Either the grid is bound to the data, or it is unbound. If the latter, you should have your recordset in memory, so looping thru a collection or array is the answer
In the DataGrid the rows are your records.
So if you want to iterate through the rows You can dO:
At least that applies for the MSHFlexGrid. I think DataGrid is the same in this respect.Code:Dim i%
For i=0 (or 1 if you have a fixed row) To Grid.Rows
'do something with the row
'for instance Grid.TextMatrix(i, 0) is the text in column 0 of each row.
Next