Hello,
I try to rewrite my application to use gridcontrol in server mode using XPServerCollectionSource. For the master grid all works fine, but I have two gridcontrols for master-detail on my form. When I try to bind the detail grid to the master grid using the old (XPCollection) approach via the GridControl.DataMember property, it doesn't work. Can you please help me how to correctly create master-detail for two gridcontrols?
Thanks, Norbert
XPServerCollectionSource master detail grid controls
Answers approved by DevExpress Support
Hello Norbert,
Thank you for the question. The standard data-binding mechanism doesn't work when the XtraGrid works in Server mode. To achieve this goal you should handle the master view's FocusedRowChanged event in which you should manually re-fill your detail grid's data source. You will need to obtain a focused master object using the master view's GetRow method and then pass this object's detail collection to the detail grid's DataSource property.
Please try this solution and inform us of your results.
Thanks,
Stan.