I have a grid that has a layout set at design time (in terms of bands and columns). At runtime I bind an array of objects to it, which works fine.
In order to clear the grid I set the datasource to null, but this wipes out the design time layout, which i don't want. Is there any way around this ?
Thanks
This is the intentional behavior. If you set your grid layout at design-time, the grid creates an internal "dummy" data source with the appropriate data structure to use until it gets a "real" data source. Setting the DataSource to null (or another data source) at run-time will make the grid pick up the structure of the new data source (or empt itself in the case of null).
Thats exactly what I ended up doing, works fine but I don't understand how the grid gets initialised with no data, but preserves the layout defined as design time, but if you try and unbind by getting rid of the datasource it wipes the layout -
I am guessing here... but couldn't you just create a identical blank array and just set it to that when you need to whipe the data?