flexiGrid vs Datagrid
In VB6 I used a flexigrid control from Component One, I could access cells using the textMatrix property and then set the cell to a value.
For iIndex = 1 To flexiGrid.Rows - 1
flexiGrid.TextMatrix(iIndex, 2) = False
Next
How is this done with a data grid, how could I iterate through the grid cells and access them?
the best I can come up with so far is from the following link from Microsoft
'http://msdn.microsoft.com/msdnmag/issues/02/07/AdvancedBasics/default.aspx
Function ShowDSInOutputWindow(ByVal ds As DataSet, Optional ByVal sTable As String = "")
'Generic DataSet debug function
Dim cldebug As DataColumn
Dim tbdebug As DataTable
Dim rw As DataRow
If sTable = "" Then
tbdebug = ds.Tables(0)
Else
tbdebug = ds.Tables(sTable)
End If
Debug.WriteLine("âââââââââââ ââââââ")
Debug.WriteLine(vbTab & vbTab & "DS Table: " & tbdebug.ToString())
Dim bFirst As Boolean = True
For Each rw In tbdebug.Rows
If bFirst Then
For Each cldebug In tbdebug.Columns
If cldebug.DataType.Name <> "Byte[]" Then
Debug.Write( _
cldebug.ColumnName & vbTab)
End If
Next cldebug
Debug.WriteLine("")
bFirst = False
End If
For Each cldebug In tbdebug.Columns
If cldebug.DataType.Name <> "Byte[]" Then
Debug.Write(rw.Item(cldebug) & vbTab)
End If
Next cldebug
Debug.WriteLine("")
Next
Debug.WriteLine("âââââââââââ ââââââ")
End Function
Regards
|