T
tshad
I am use the MouseUp event to tell me which row in my DataGrid
(EmailDataGrid) was selected - as follows:
***********************************************************
Private Sub EmailDataGrid_MouseUp(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) Handles
EmailDataGrid.MouseUp
Dim numRows As Integer =
EmailDataGrid.BindingContext(EmailDataGrid.DataSource, _
EmailDataGrid.DataMember).Count
Call GetSelectedEmail(EmailDataGrid.CurrentRowIndex)
End Sub
**************************************************************
The problem is that if one of the column headers is selected to sort it,
this event gets called.
I thought I could use the CurrentRowIndex to tell what was selected, but it
is "0" as if the 1st row was selected.
How do I tell that the header was selected instead of a row?
Thanks,
Tom
(EmailDataGrid) was selected - as follows:
***********************************************************
Private Sub EmailDataGrid_MouseUp(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) Handles
EmailDataGrid.MouseUp
Dim numRows As Integer =
EmailDataGrid.BindingContext(EmailDataGrid.DataSource, _
EmailDataGrid.DataMember).Count
Call GetSelectedEmail(EmailDataGrid.CurrentRowIndex)
End Sub
**************************************************************
The problem is that if one of the column headers is selected to sort it,
this event gets called.
I thought I could use the CurrentRowIndex to tell what was selected, but it
is "0" as if the 1st row was selected.
How do I tell that the header was selected instead of a row?
Thanks,
Tom