Hi,
Dim dgCell As DataGridCell
dgCell = DataGrid1.CurrentCell
MessageBox.Show(DataGrid1.Item(dgCell).ToString)
Ken
-----------
"Bruce LeMond" <(E-Mail Removed)> wrote in message
news:03b201c368f6$0c2f5d20$(E-Mail Removed)...
> I'm wanting to check a column in a datagrid and take some
> action if it equals a certain value. I have the following
> Code:
>
> Private Sub DataGrid1_CurrentCellChanged(ByVal sender As
> Object, ByVal e As System.EventArgs) Handles
> DataGrid1.CurrentCellChanged
> rows = DataGrid1.CurrentCell.RowNumber
> cols = DataGrid1.CurrentCell.ColumnNumber
> End Sub
>
> And then I have the following if statement somewhere else
> in the program:
>
> If DataSet1.Tables("ItemsOrder").Rows(rows)("Class") = "S"
> Then
> DisplaySpecialClass()
> End If
>
> When I tried running it, I'm still not getting the data
> from the datagrid row that I selected. What would I be
> doing wrong?
>
> Thanks in advance.
>
|