How to reset/clear Datagrid to its original state

Sthafrican

New member
Joined
May 25, 2005
Messages
4
Programming Experience
Beginner
Hi..i need some help :confused: to clear a datagrid i have populated with info from a dataset.
It seems quite simple to do but i cant find the property of the datagrid that works.
i heard that datatable.reset() does the job..but the datagrid doesnt have that property.

In other words.

Before:
b48xw.jpg


After:
after2ib.jpg


After populating the datagrid, i want to reset/clear/clean the datagrid to the image before.
(I will kick myself after i know the solution..it seems obvious)
 
When you use a dataGrid with bound data, to alter the data in the dataGrid you must work with the underlying dataSource. In other words, clear the dataSet/dataTable.
Use either the dataSet.Clear or dataTable.Clear procedure.
 
Back
Top