Master-Detail grid bound to a BO


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I would like to use a master-detail grid view for my DevExpress grid, but still use a BO or a BusinessBindingSource for the DataSource.  How do I setup the Master/Detail relationship in the BO so that it works in the grid correctly?  It has to know somehow which fields to use in the master view and which in the detail.
Replies
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I've tried this but I get an error saying Cannot create a DataRelation if Parent or Child Columns are not in a DataSet.

BusinessObject.CurrentDataTable.ChildRelations.Add("ListRelation", CalcClientBO.CurrentDataTable.Columns("ClientKey"), ClientInfoBO.CurrentDataTable.Columns("ClientKey"))

grdList.DataSource = BusinessObject.CurrentDataTable

Any ideas on anything else I can try?


StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
No, I'm not sure what else you can try... you might have to create your own DataSet object and add the CurrentDataTables from the business objects you want to include in the grid.  Then, you should be able to display them in the grid, although, you will probably need to set the DataSet as the data source, not one of the business objects.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search