﻿<?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?)  » DataSet Relations Problem</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 06:34:04 GMT</lastBuildDate><ttl>20</ttl><item><title>DataSet Relations Problem</title><link>http://forum.strataframe.net/FindPost21578.aspx</link><description>Andria Jensen posted the following solution to her relationship problem back in 2006 ([url=http://forum.strataframe.net/Topic2965-7-1.aspx]topic[/url]):&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
Dim ds As New DataSet&lt;br&gt;
Me.CalcClientBO.FillAll()&lt;br&gt;
Me.ClientInfoBO.FillAll()&lt;br&gt;
&lt;br&gt;
ds.Tables.Add(CalcClientBO.CurrentDataTable)&lt;br&gt;
ds.Tables.Add(ClientInfoBO.CurrentDataTable)&lt;br&gt;
ds.Relations.Add("ListRelation", ds.Tables(0).Columns("ClientKey"), ds.Tables(1).Columns("ClientKey"), False)&lt;br&gt;
&lt;br&gt;
grdList.DataSource = ds.Tables(0)&lt;br&gt;
grdList.LevelTree.Nodes.Add("ListRelation", gvListDtl)&lt;br&gt;
grdList.RefreshDataSource()&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
I used the above code as a template for my own.  It has been working beautifully until last Friday.  For some reason, using Andria's code as reference, the string "ListRelation" is being treated as a custom property of a business object.  The code is trying to find the custom field name of "ListRelation" on the business object CalcClientBO.  No changes have been made to CalcClientBO since 12/23/2008.&lt;br&gt;
&lt;br&gt;
For additional information, here is the message and the stack trace:&lt;br&gt;
&lt;br&gt;
[quote][b]Message:[/b] "The given item name could not be evaluated.  The item 'ListRelation' does not exist on the business object."[/quote]&lt;br&gt;
&lt;br&gt;
[quote][b]Stack Trace:[/b] "   at MicroFour.StrataFrame.Business.BusinessLayer.GetDescriptor(String FieldName)    at MicroFour.StrataFrame.Business.BusinessLayer.GetPropertyDescriptor(String FieldName)    at MicroFour.StrataFrame.Business.BusinessBindingSource.BusinessObject_CurrentView_ListChanged(Object sender, ListChangedEventArgs e)    at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)    at System.Data.DataView.OnListChanged(ListChangedEventArgs e)"[/quote]&lt;br&gt;
&lt;br&gt;
The grid involved is a DevEx XtraGrid, but I doubt that should matter much.&lt;br&gt;
&lt;br&gt;
Can anyone direct me on what to look for to resolve this problem?&lt;br&gt;
&lt;br&gt;
Thanks!!&lt;br&gt;
Bill</description><pubDate>Mon, 19 Jan 2009 10:56:34 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: DataSet Relations Problem</title><link>http://forum.strataframe.net/FindPost21579.aspx</link><description>Resolution:&lt;br&gt;
&lt;br&gt;
I decided to add a new reference to the business objects rather than use the business objects assigned to the form during the design-time session.  Basically, the code looks as follows:&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
Dim ds As New DataSet&lt;br&gt;
Dim mBO1 As New CalcClientBO&lt;br&gt;
Dim mBO2 As New ClientInfoBO&lt;br&gt;
Me.mBO1.FillAll()&lt;br&gt;
Me.mBO2.FillAll()&lt;br&gt;
&lt;br&gt;
ds.Tables.Add(mBO1.CurrentDataTable)&lt;br&gt;
ds.Tables.Add(mBO2.CurrentDataTable)&lt;br&gt;
ds.Relations.Add("ListRelation", ds.Tables(0).Columns("ClientKey"), ds.Tables(1).Columns("ClientKey"), False)&lt;br&gt;
&lt;br&gt;
grdList.DataSource = ds.Tables(0)&lt;br&gt;
grdList.LevelTree.Nodes.Add("ListRelation", gvListDtl)&lt;br&gt;
grdList.RefreshDataSource()&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
I bypassed the use of the BBS on the form, since that was used mostly for the design-time setup of the grid.&lt;br&gt;
&lt;br&gt;
So far, everything seems to be working just fine.&lt;br&gt;
&lt;br&gt;
Bill</description><pubDate>Mon, 19 Jan 2009 10:56:34 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>