N
NBB
My windows form has three textboxes, two buttons, and one datagrid
bound to a datatable. When the user enters text into the three
textboxes, then clicks the "Add" button, the data from the textboxes
will populate the datatable and instantly be displayed in the 3 column
datagrid below as a new row of data. When they select an item in the
datagrid and click the "Remove" button, the selected item is deleted
from the grid. So far so good.
Now, the user can also edit the items in the datagrid directly (add,
change or delete), bypassing the textboxes. I can disable this by
making the datagrid read-only. But it still allows for clicking on an
item in a column and selecting its text. I'd rather it didn't.
I'm essentially looking to make it work like the Processes tab of the
Task Manager. Just a columnar list of data, that when any item in a
row is clicked, the entire row is simply selected, not focused for
editing.
Perhaps I'm missing something in the datagrid that will make it act
like this? Or perhaps I'm using the wrong control altogether?
bound to a datatable. When the user enters text into the three
textboxes, then clicks the "Add" button, the data from the textboxes
will populate the datatable and instantly be displayed in the 3 column
datagrid below as a new row of data. When they select an item in the
datagrid and click the "Remove" button, the selected item is deleted
from the grid. So far so good.
Now, the user can also edit the items in the datagrid directly (add,
change or delete), bypassing the textboxes. I can disable this by
making the datagrid read-only. But it still allows for clicking on an
item in a column and selecting its text. I'd rather it didn't.
I'm essentially looking to make it work like the Processes tab of the
Task Manager. Just a columnar list of data, that when any item in a
row is clicked, the entire row is simply selected, not focused for
editing.
Perhaps I'm missing something in the datagrid that will make it act
like this? Or perhaps I'm using the wrong control altogether?