Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1935
Clear a grid of all data
posted

I have a scenario where I use 2 grids, and use them frequently, and with differing numbers of rows and columns.

Between usages, I'd like to hold them in memory for quick reuse later, but I'd like to hold them with no data in them to minimize memory usage.

I can't use deleteRows because that would actually remove them from the datasource.

I'm just trying to remove all the data from the grid itself, without touching the datasource.

Is there a quick easy way to return the GridView back to its state before it had a datasource, and it had no rows or columns, but was allocated and had various behavioral properties set?

Thanks