PDA

View Full Version : dataGridView row icon thingys


PEN
07-27-2009, 08:31 PM
In the rows of dataGridView there is an ">" icon on the selected row. It is a little black arrow, does any know how to get rid of it or is it even possible. I have limited space in my UI and I want to get names in the rows, the other option is to threat the first column as it and draw my own look into it.

denisT
07-27-2009, 09:32 PM
In the rows of dataGridView there is an ">" icon on the selected row. It is a little black arrow, does any know how to get rid of it or is it even possible. I have limited space in my UI and I want to get names in the rows, the other option is to threat the first column as it and draw my own look into it.

if you don't need an ">" icon in row headers just set "RowHeadersVisible" to OFF...

or maybe I missunderstood you. Do you mean "to get names in the row headers"?

denisT
07-28-2009, 01:12 AM
I suggest to keep row headers visible but set their width to some small value to hide this "selection arrow". Also set RowHeadersWidthSizeMode to DisableResizing. And use first column for names. It gives you as a bonus (:)) ability to sort by names.

PEN
07-28-2009, 12:36 PM
I know I can turn them off and lock the sizing. I wanted to keep the names in the row header but remove the icons in them.

So what is the problem with completely removing row headers Denis?

denisT
07-28-2009, 05:25 PM
So what is the problem with completely removing dataGridVIew control's row headers Denis?



If you remove (hide) row headers you will loose some dataGridView default functionality. For example, click on header selects full row, and click on headers column header (top-left) selects all row headers and all rows. Also you will loose couple useful events (RowHeaderMouseClick and RowHeaderMouseDoubleClick). Also you will loose row headers tool tips and ability to add Context Menu. Using different back colors for row headers you can mark them or show their state...



So, it seems like you will pay a big price for the row headers removing. But I don't now how you designed you control. Maybe you don't need any of those features at all.

PEN
07-28-2009, 05:29 PM
Ya I might need some of those so I think I will do as you suggest and leave them as a small sliver on the side. Thanks for the info.

CGTalk Moderation
07-28-2009, 05:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.