|
-
August 23rd, 2007, 09:14 PM
#1
DataGridView Selected Row
I have a DataGridView control with the FullRowSelect SelectionMode, chosen (MultiSelect=False). So I select a row and all cells in that row go blue.
I don't want the left-hand cell to go blue when I select a row, as this cell is colour-coded (background colour of cell is either red or green and I want the cell to stay that colour even when selected)
Does anyone have any idea which event to handle to prevent this?
Thanks
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
-
August 23rd, 2007, 10:46 PM
#2
Re: DataGridView Selected Row
ok - turned out to be straighforward.
Whenever you set:
row.Cells["MyColumn"].Style.BackColor = Color.Green;
at the same time set:
row.Cells["MyColumn"].Style.SelectionColor = Color.Green;
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|