Delete all of the contents in a datagrid by:Anonymous
|
I need to delete all of the contents in a datagrid before re-loading it. Please help.
Thanks.
|
| | Reply: by:Anonymous
|
| | Hi Bill
What you meant by deleting all the content in the datagrid, is it clearing the datagrid or deleting the records from the database itself.
Sadha Sivam S Malleable Minds Software Pvt Ltd
|
| | Reply: by:Cor Ligthert
|
| | Hi Bill,
I assume this is a windowforms question. A little bit in other words than Sadha said, clear the datasource (mostly the table)
Cor
|
| | Reply: by:adamz5@hotmail.com (adamz5)
|
| | Presume the datagrid is bound to the table (test_table in e.g)
test_table.clear()
should clear the table and empty the datagrid
Regards
Adam
|
| | Reply: by:Anonymous
|
| | If you just want to clear the grid without deleting any data, you can set the datasource to nothing and then restore it:
grdMyGrid.Datasource = Nothing grdMyGrid.Refresh grdMyGrid.Datasource = ? (name of your datasource)
|
0 Comments:
Post a Comment
<< Home