﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Master-Detail grid bound to a BO</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 05:28:42 GMT</lastBuildDate><ttl>20</ttl><item><title>Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost2965.aspx</link><description>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.&amp;nbsp; How do I setup the Master/Detail relationship in the BO so that it works in the grid correctly?&amp;nbsp; It has to know somehow which fields to use in the master view and which in the detail.</description><pubDate>Tue, 26 Sep 2006 14:45:05 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost3077.aspx</link><description>The problem with the BOs being able to do this automatically, is that the DataTables have to belong to a DataSet in order to define the relationships on them.</description><pubDate>Tue, 26 Sep 2006 14:45:05 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost2982.aspx</link><description>Yep, here's what I ended up having to do to get it working:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; ds &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; DataSet&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CalcClientBO.FillAll()&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ClientInfoBO.FillAll()&lt;/P&gt;&lt;P&gt;ds.Tables.Add(CalcClientBO.CurrentDataTable)&lt;BR&gt;ds.Tables.Add(ClientInfoBO.CurrentDataTable)&lt;BR&gt;ds.Relations.Add(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ListRelation"&lt;/FONT&gt;&lt;FONT size=2&gt;, ds.Tables(0).Columns(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ClientKey"&lt;/FONT&gt;&lt;FONT size=2&gt;), ds.Tables(1).Columns(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ClientKey"&lt;/FONT&gt;&lt;FONT size=2&gt;), &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;BR&gt;&lt;BR&gt;grdList.DataSource = ds.Tables(0)&lt;BR&gt;grdList.LevelTree.Nodes.Add(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ListRelation"&lt;/FONT&gt;&lt;FONT size=2&gt;, gvListDtl)&lt;BR&gt;grdList.RefreshDataSource()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;It would be a lot easier if somehow the ParentRelationship set on the Parent/Child BO's could somehow create this relationship for you, so that you could still just set the BusinessBindingSource or the CurrentDataTable of the BO to the DataSource.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 22 Sep 2006 09:18:02 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost2981.aspx</link><description>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.&amp;nbsp; 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.</description><pubDate>Fri, 22 Sep 2006 09:12:56 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost2972.aspx</link><description>I've tried this but I get an error saying Cannot create a DataRelation if Parent or Child Columns are not in a DataSet.&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;BusinessObject.CurrentDataTable.ChildRelations.Add(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ListRelation"&lt;/FONT&gt;&lt;FONT size=2&gt;, CalcClientBO.CurrentDataTable.Columns(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ClientKey"&lt;/FONT&gt;&lt;FONT size=2&gt;), ClientInfoBO.CurrentDataTable.Columns(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ClientKey"&lt;/FONT&gt;&lt;FONT size=2&gt;))&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;BR&gt;grdList.DataSource = BusinessObject.CurrentDataTable&lt;/P&gt;&lt;P&gt;Any ideas on anything else I can try?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 21 Sep 2006 16:00:35 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost2971.aspx</link><description>The way that they show it working is that you set some kind of ChildRelations property on the DataTable that you are setting as the DataSource for the grid.&amp;nbsp; This determines which columns are treated as master and which as detail on the DevExpress side.&amp;nbsp; I'm having some trouble finding any kind of ChildRelations collection on the BO.&amp;nbsp;</description><pubDate>Thu, 21 Sep 2006 15:26:04 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Master-Detail grid bound to a BO</title><link>http://forum.strataframe.net/FindPost2968.aspx</link><description>I think you can use the Master-Detail grid with multiple data sources, like a parent &amp;amp; child.&amp;nbsp; There have been some more changes to the BusinessBindingSource so that it will support the ICurrencyManagerProvider interface better that might help you with configuring your grid.</description><pubDate>Thu, 21 Sep 2006 15:06:10 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>