I am using the following code to pop up a menu:
| if(e.RowIndex>=0&&e.ColumnIndex>=0&&e.Button==MouseButtons.Right) |
| { |
| dgSJ_Yarn.Rows[e.RowIndex].Selected=true; |
| Rectangler=dgSJ_Yarn.GetCellDisplayRectangle(e.ColumnIndex,e.RowIndex,true); |
| contextMenuYarn.Show(dgSJ_Yarn,r.Left+e.X,r.Top+e.Y); |
| } |
There are 2 rows in the grid ... the 1st row/column his highlighted when the grid opens for the first time.
When i right click on the 2nd row the full row is selected but the 1st row/column of is still selected as well.
How can i configure the grid so that is only the 2nd row is selected?
I tried changing the selectionmode to fulllrowselect but the rowheader stays on the 1st row.
thx