DataGridView: how to focus the whole row instead of a single cell?
Posted
by Tomas Sedovic
on Stack Overflow
See other posts from Stack Overflow
or by Tomas Sedovic
Published on 2008-11-12T23:38:00Z
Indexed on
2010/04/05
10:33 UTC
Read the original article
Hit count: 215
I'd like to use the DataGridView control as a list with columns. Sort of like ListView in Details mode but I want to keep the DataGridView flexibility.
ListView (with Details view and FullRowSelect enabled) highlights the whole line and shows the focus mark around the whole line:
DataGridView (with SelectionMode = FullRowSelect) displays focus mark only around a single cell:
So, does anyone know of some (ideally) easy way to make the DataGridView row selection look like the ListView one?
I'm not looking for a changed behaviour of the control - I only want it to look the same.
Ideally, without messing up with the methods that do the actual painting.
© Stack Overflow or respective owner