the other way may work, but doesnt for me as "dg.Select(ht.Row)" is read only
and cannot assign the row selected to any variable and you dont know which
row you selected. i modified it to this "i = ht.Row" and can read which row i
have.
Dim i As Integer
'commented out - datagrid created in design time
'Dim dg As DataGrid = DirectCast(sender, DataGrid)
Dim ht As DataGrid.HitTestInfo
ht = dg.HitTest(e.X, e.Y)
'commented out - dg.select is read only.
'dg.Select(ht.Row)
' i is the row number to use as see fit
i = ht.Row
hope that helps,
lee holsenbeck
"AA" wrote:
Do anyone know how to select a full row in datagrid instead of a particular
cell?
Whenever user click on a cell, I want to whole row to be selected.
I tried to code that in the cellColumnChange event programmatically that
highlighying the row of the cell.
However, it is strange that the cell will still be hightlighy in differenet
style of the row.
Any idea?
Thx in advance!