diamondgeezer1974
Member
Hi.
Just started toying with the DataGridview, and realising what a complex control it can be.
I've got a DGV that has a total row at the very top that totals up figures beneath it. All that works fine. This row is shaded a different colour and is read only.
What I want to do is prevent that row from being selected, as when the control loads the row pointer is against the top row..... so if row 1 (index(0)) is selected when the form is loaded then the 2nd row should be selected instead (index(1)).
What we also need to put in place is that if the user clicks in the top row, then the request gets cancelled and the row pointer stays on the current row instead.
What's the easiest way for this to be done? I've tried doing this looking at various properties, but it always seems like I'm trying to modify a property that is read-only so want to know what properties I have to use to get this to work.
Should be simple enough.
Thanks for your help in advance.
Just started toying with the DataGridview, and realising what a complex control it can be.
I've got a DGV that has a total row at the very top that totals up figures beneath it. All that works fine. This row is shaded a different colour and is read only.
What I want to do is prevent that row from being selected, as when the control loads the row pointer is against the top row..... so if row 1 (index(0)) is selected when the form is loaded then the 2nd row should be selected instead (index(1)).
What we also need to put in place is that if the user clicks in the top row, then the request gets cancelled and the row pointer stays on the current row instead.
What's the easiest way for this to be done? I've tried doing this looking at various properties, but it always seems like I'm trying to modify a property that is read-only so want to know what properties I have to use to get this to work.
Should be simple enough.
Thanks for your help in advance.
Last edited: