I am trying to switch between datasets with my grid but I cannot seem to clear the old databindings and load new so when I try to display a different dataset I get an error which references the old dataset. I have tried
grid.clear() – This works but it clears everything not just the databindings. grid.databindings.clear() – This does not appear to do anything. grid.datarows.clear() – No luck here either.
Any ideas on how to do this would be appreciated.
Imported from legacy forums. Posted by Nick (had 2565 views)
I think you should be able to just set the <b>DataSource</b> and <b>DataMember</b> properties of the GridControl to their new values. To clear the databindings, set both properties to <i>null</i> (<i>Nothing</i> in VB.NET).
Imported from legacy forums. Posted by Tommy (had 158 views)