We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Master-Detail with Virtual Grid

I''ve seen your examples of using two grids in a master detail relationship by employing the use of the datasource and datamember properties of each grid in a databound scenario. However, does the grid provide similar built in functionality when both grids are used in "virtual mode"? Or will I have wire up all that functionality myself? Are there any examples that exist dealing with my scenario? Thank you for your help.

1 Reply

AD Administrator Syncfusion Team April 27, 2004 06:03 PM UTC

Hi Peter, yes you will have to wire these events yourself. In a GridDataBoundGrid the grid listens to CurrencyManager.PositionChanged events and repositions the current row based on that event. Also, the Windows Forms Currency Manager loads the data for the detail grid whenever the CurrencyManager.Current property is changed. With a virtual grid there is no CurrencyManager support unless you would explicitly add support for it. But wiring to Current Cell events should not be difficult. The events that you should be most interested in the parent grid are CurrentCellActivated and CurrentCellMoved. These events will be raised when the cell is moved. Within your event handlers you could check if the current cell was moved to a new row or if it stayed at the same row. If it was moved to a new record then you could get the data from that row and replace the datasource of your details grid so that it then displays the table that belongs to the record in the parent table. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon