Hi
I have a wingrid that is bound to a datasource
initially the datasource is empty and nothing, including the column headers is displayed in it
a button loads a screen that allows the creation of an item, when this window is exited, the data for the wingrid is requeried from the datasource and it is displayed, but not in the format that was defined at design time, in I guess raw format showing all columns
I have attempted to use the wingrid.DisplayLayout.save in pre-bound and post-bound states to preserve the layout (when the datasource is empty) and then load the layout once the datasource has data, but I still get the raw all column layout.
at what point should I save the layout as it seems the layout isnt initialising when the datasource is empty and when I rebind it looses the layout anyway.
Please help!
Larry said:at what point should I save the layout
I have worked out what my problem is.
when binding to an empty LinqtoSQL entity list, it appears to wipe the grid format, so when you rebind to a populated list, the format is empty and you get all the columns displayed
to get round this I simply check that the lists.count > 0 and only bind if it is
Many Thanks