Question Datagrid problem

juhah

Active member
Joined
Apr 16, 2007
Messages
28
Programming Experience
3-5
Every time a form is loaded, I create a datagrid with two columns. The problem is that the first cell in the first column is automatically selected and blue. Setting the datagrid ReadOnly-property to False doesn't help. I found that setting the datagrid.Enabled=False helps, but then the scrollbars (which i need) won't work.

How can I make the whole datagrid sort of non-clickable and non-selectable, so that the user can't set focus to the cells, and also the first cell isn't selected when the form is loaded, but the datagrid is still scrollable?
 
I dont use DataGRid any more, but you can try the ReadOnly property, and also the properties to set the selection foreground and background colors
 
The pointer of the datagrid ALWAYS selects the row it points at.
So you may "unselect" the row as far as removing the highlight color,
but the row remains selected. I don't see any way to truly unselect a row since there is always a pointer present. Maybe DataGrid is not your best choice for your task?
 
Back
Top