AD
Administrator
Syncfusion Team
April 11, 2005 09:35 AM UTC
I do not know how this docking framework works, but in a lot of cases, Docking frameworks dynamically swap out the parent of the window being docked. And when a parent of a control is nuked, the underling BindingContext which manages all the databinding for that control is also nuked. So, I suspect this is what is going on.
If there is some kind of DockStateChanged event in this framework, then you can try putting all the databinding initalization code in this event so that the databinding is reset to your requirements each time the dock manager changes the dockstate.
Sometimes all that is necessary is to create a form class level member that holds a fixed binding context. Then during initial form creation, create a BindingCOntext and save it in this form member. Then immediatly after creeating the GridDataBoundGrid, set grid.BindinContext to the form level member. Also, in the ''DockStateChanged'', reset the grid.BindingContext back to the same form member. This way, you will always be sure the grid is using the same bindingcontext. But this may not be sufficient if you are loosing things like columns and filterbars. In particular for the filterbar, you should probably unwire it before the docking manager changes the dockstate and then rewire it afterwards.