J
jim
I've been working with the hittestinfo class in my application trying to
determine what column my user has clicked. Everything works fine so long as
the columns are set to their default 75 pixel width. When I change the width
of the column either in my columnstyle or in the datagrid control at
runtime, the incorrect column is being returned.
here's the code...
Dim tempGrid as DataGrid = DirectCast(sender, DataGrid)
'--- Select the whole row when the user clicks in the cell area ---'
Dim pt as New Point(e.X, e.Y)
Dim ht as DataGrid.HitTestInfo = Me.grdPoItems.HiTest(pt)
If ((ht.Row > -1) AndAlso (ht.Column > -1)) Then
MessageBox.Show(cstr(ht.Column))
End If
I have this placed inside a DataGrid.MouseUp event handler.
I'm working with VS 2003, Framework 1.1, No SP's installed.
Has anyone else seen this behavior?
jim
determine what column my user has clicked. Everything works fine so long as
the columns are set to their default 75 pixel width. When I change the width
of the column either in my columnstyle or in the datagrid control at
runtime, the incorrect column is being returned.
here's the code...
Dim tempGrid as DataGrid = DirectCast(sender, DataGrid)
'--- Select the whole row when the user clicks in the cell area ---'
Dim pt as New Point(e.X, e.Y)
Dim ht as DataGrid.HitTestInfo = Me.grdPoItems.HiTest(pt)
If ((ht.Row > -1) AndAlso (ht.Column > -1)) Then
MessageBox.Show(cstr(ht.Column))
End If
I have this placed inside a DataGrid.MouseUp event handler.
I'm working with VS 2003, Framework 1.1, No SP's installed.
Has anyone else seen this behavior?
jim