StrataFrame Forum

Master-Detail GridControl Sample

http://forum.strataframe.net/Topic16901.aspx

By Alex Bibiano González - 6/8/2008

I'm looking for a sample windows that uses 2 gridcontrols with a master-detail relationship (for example a invoice windows).

I want to use the Maintenance Toolbar for the main gridcontrol, but don't want to use a tollbar for the detail grid (I want to use the gridcontrol functions to add, delete and edit rows), but when I save the main grid, I want to save also the detail grid with his BO.

Thanks,

Alex B.

By Trent L. Taylor - 6/9/2008

Alex, there are a lot of samples that show how to implement this type of functionality.  The logic is the same whether you are using grids or standard user controls.  You can look at the BBS sample (BusinessBindingSource and Grids) to see how to interact with the grid, but you can look at a number of the other samples to see how to deal with parent and child relationships.  This is a very common thing and is discussed throughout the forum as well as the samples.

You will want to look at the IncludeInForm properties (on the form and the BOs) to see how to get the MaintenanceFormToolstrip to include some records in an Add, Edit, etc. and exclude others while all being included in a Save().