I looked at GridColumnStylesCollection. Haven't been able to figure out how
to get the row & column counts out of it yet...but this is what I came up
with so far. It works unless the user enters a number greater than the
number of columns.
Dim intCol As Integer = Val(InputBox("Which column contains the Computer
Name's to query?", "Run Query"))
Dim intRow As Integer = 0
Dim msg As String
If intCol > 0 Then
Try
Do
msg = msg & DataGrid1.Item(intRow, intCol-1) & " : "
intRow += 1
Loop
Catch ex As Exception
MsgBox(msg, MsgBoxStyle.Information, "End of Rows reached. Total Rows: " &
intRow.ToString)
End Try
End If
"yEaH rIgHt" <no******@haha.com> wrote in message
news:10*************@corp.supernews.com...
You can get the column count using the GridColumnStylesCollection. Look
it up in MSDN to see how to use it. Use the search term
GridColumnStylesCollection.
Terry Olsen wrote: I loaded my datagrid. Now I need to step through the rows & columns to
parse the data contained in the cells. But there's no "rows.count" or
"columns.count" properties to read. How can I know the total rows &
columns in my data grid?
Also, how can I save the data in my grid to a csv file when I'm all
done?
Thanks.