views:

24

answers:

1

Hi,

I have a form showing a gridview. The data is bound dynamically, depending on several options that the user clicks on. The populating data works fine (bound from dynamically created datasets). The problem lies, when I want to switch between displaying data whereby the tables/datasets contain different layouts. The gridview keeps showing the previous layout.

How would I unbind all data to the gridview, so that I can then display the brand new table?

Thanks.

A: 

Set datasource = null ?

ykatchou
I've tried that, but the columns stay there. I've also tried refreshing and datagridview.columns.clear but that method completely clears the control and doesn't allow any further binding?
Darren Young
Have you try invalidate() or Reset() ?
ykatchou