Datagrid Problem
Hi,
i want to ask few question
1. Currently im creating checkbox in the datagrid but i get 3 types of values which is true false and null
how do i get only trus and null in the checkbox
2. How do i highlight the whole row when i click on one row in the datagrid
3. how do i remove the add new row in the datagrid
thax all thax guyzz
Hi,
I don't think I understand your first question. But fot your second,
2. Just set the SelectionMode property of the grid to FullRowSelect.
3. To Remove rows use,
dataGridView1.Rows.Remove(dataGridView1.Rows[0]);
cheers,
Paul June A. Domag
Note: Remove method removes the row from the collection, it does not mark the row for deletion. If you call the
Update method of
DataAdapter object or
TableAdapter object after calling
Remove method, the row will not be removed from the database.
In order to reconcile changes back to database use Delete method of the DataRow object.
Hi,
I think I misunderstood your question,
Ferryandi wrote: |
3. how do i remove the add new row in the datagrid thax all thax guyzz |
|
Well, to do this you must set the AllowUserToAddRows properties to false. I think that should do the trick...
cheers,
Paul June A. Domag