﻿<?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 / Business Objects and Data Access (How do I?)  / Business Binding Source DataSource Property / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Sun, 07 Sep 2008 16:49:19 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>[quote]I can use OrdersBBS property for databinding by assigning it to the BBS dropped on the form or assigning it directly to the Grid. [/quote]&lt;/P&gt;&lt;P&gt;At this point it is just programming.  If you want to write your BBS class so that you can swap between different Orders BOs or share the same one that is totally up to how you decide to design your application.  Another option would be to create a shared OrdersBO somewhere that gets used by both places.  But this is just more of a design issue that a functionality issue...you can make it go either way with this class.</description><pubDate>Wed, 09 Apr 2008 09:29:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>With this method, I have an OrdersBBS that wraps a Order Business Object.But I still need an Order Object at design time to manage grid columns (i.e properties related to columns)&lt;/P&gt;&lt;P&gt;I can use OrdersBBS property for databinding by assigning it to the BBS dropped on the form or assigning it directly to the Grid. &lt;/P&gt;&lt;P&gt;We have to find new way.</description><pubDate>Wed, 09 Apr 2008 01:17:00 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>Ertan,&lt;P&gt;You can do this but you will need to use a BBS as Peter was pointing out.  This is exactly what we do for our reports.  We create a class that inherits from a BBS and then expose the BO (this would only be a single instance).  Then that BO exposes another BBS that wraps another BO.  This way you can get exactly what you want.&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;Public Class OrdersBBS&lt;BR&gt;    Inherits MicroFour.StrataFrame.Business.BusinessBindingSource&lt;BR&gt;&lt;/P&gt;&lt;P&gt;#Region " Constructors "&lt;/P&gt;&lt;P&gt;    ''' &amp;lt;summary&amp;gt;&lt;BR&gt;    ''' Default Constructor&lt;BR&gt;    ''' &amp;lt;/summary&amp;gt;&lt;BR&gt;    ''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;BR&gt;    Public Sub New()&lt;BR&gt;        Me.BusinessObject = New OrdersBO()&lt;BR&gt;    End Sub&lt;/P&gt;&lt;P&gt;#End Region&lt;/P&gt;&lt;P&gt;#Region " Public Methods "&lt;/P&gt;&lt;P&gt;    ''' &amp;lt;summary&amp;gt;&lt;BR&gt;    ''' Populate the data source&lt;BR&gt;    ''' &amp;lt;/summary&amp;gt;&lt;BR&gt;    ''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;BR&gt;    Public Sub Fill(Byval customerPK As Long)&lt;BR&gt;        If Not Me.DesignMode Then&lt;BR&gt;            CType(Me.BusinessObject, OrdersBO).FillByParentPrimarykey(customerPk)&lt;BR&gt;        End If&lt;BR&gt;    End Sub&lt;/P&gt;&lt;P&gt;#End Region&lt;BR&gt;    &lt;BR&gt;End Class&lt;/P&gt;&lt;P&gt;Public Class CustomersBBS&lt;BR&gt;    Inherits MicroFour.StrataFrame.Business.BusinessBindingSource&lt;BR&gt;&lt;/P&gt;&lt;P&gt;#Region " Constructors "&lt;/P&gt;&lt;P&gt;    ''' &amp;lt;summary&amp;gt;&lt;BR&gt;    ''' Default Constructor&lt;BR&gt;    ''' &amp;lt;/summary&amp;gt;&lt;BR&gt;    ''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;BR&gt;    Public Sub New()&lt;BR&gt;        Me.BusinessObject = New CustomersBO()&lt;BR&gt;    End Sub&lt;/P&gt;&lt;P&gt;#End Region&lt;/P&gt;&lt;P&gt;#Region " Private Fields "&lt;BR&gt;&lt;BR&gt;    Private _Orders As New OrdersBBS()&lt;BR&gt;&lt;BR&gt;#End Region&lt;/P&gt;&lt;P&gt;#Region " Public Methods "&lt;/P&gt;&lt;P&gt;    ''' &amp;lt;summary&amp;gt;&lt;BR&gt;    ''' Populate the data source&lt;BR&gt;    ''' &amp;lt;/summary&amp;gt;&lt;BR&gt;    ''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;BR&gt;    Public Sub Fill()&lt;BR&gt;        If Not Me.DesignMode Then&lt;BR&gt;            CType(Me.BusinessObject, CustomersBO).FillTop100()&lt;BR&gt;&lt;BR&gt;            '-- You could load the Orders BO in the OrdersBBS here&lt;BR&gt;        End If&lt;BR&gt;    End Sub&lt;/P&gt;&lt;P&gt;#End Region&lt;BR&gt;&lt;BR&gt;#Region " Public Properties "&lt;BR&gt;&lt;BR&gt;    Public Readonly Property Orders As OrdersBBS&lt;BR&gt;        Get&lt;BR&gt;             '-- You may want to apply a filter here to filter our the orders&lt;BR&gt;             '    for the current customer here&lt;BR&gt;             '_Orders.Filter = "or_cs_pk = " &amp;amp; _Customers.pk.ToString()&lt;BR&gt;             Return _Orders&lt;BR&gt;        End Get&lt;BR&gt;    End Property&lt;BR&gt;&lt;BR&gt;#End Region&lt;BR&gt;    &lt;BR&gt;End Class[/codesnippet]</description><pubDate>Tue, 08 Apr 2008 09:21:11 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>Thanks.&lt;/P&gt;&lt;P&gt;I am looking for a solution that there is no two instance of same object.</description><pubDate>Tue, 08 Apr 2008 08:26:34 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>G'day&lt;/P&gt;&lt;P&gt;What you could do is drop a copy of the Companies BO onto the form, drop a BBS onto the form and set the Companies BO as the source, configure the devexpress components to use the BBS to access the fields you want, then delete the copy of the Companies BO. I believe that this will leave all the devexpress bindings in place. Then at run time bind the Groups.companies BO to the BBS. However this would be difficult to maintain and I would not do it!&lt;/P&gt;&lt;P&gt;I suggest that you leave the Companies BO on the form and either copy the datatable from the Groups.Companies BO into it, or maybe &lt;FONT size=2&gt;ShareCurrentDataTable (which I know nothing about but sounds promising in this instance)&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Peter</description><pubDate>Tue, 08 Apr 2008 03:38:07 GMT</pubDate><dc:creator>Peter Denton</dc:creator></item><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>Let me explain.&lt;/P&gt;&lt;P&gt;I have a complex Business Object (Groups) which has a property as another business object (companies).&lt;/P&gt;&lt;P&gt;"Groups" business object comes as a parameter from another form. I can fill Groups.companies. As a result, I have Companies business object &lt;BR&gt;that is not on the form. But If we give the business object or (otherwise the datatable) to a control in designtime, We can manage which columns will be displayed.&lt;/P&gt;&lt;P&gt;Since I don't have "companies" object on the form,I couldn't use this oppurtinity. &lt;/P&gt;&lt;P&gt;There is need to drop a Company Business Object onto the from. But I have one. I want to use that one.&lt;/P&gt;&lt;P&gt;How can I accomplish that feature provided by Binding Source with BBS ? Since I have to use BBS for Devexpress Binding.</description><pubDate>Tue, 08 Apr 2008 01:03:53 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item><item><title>RE: Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>I am sorry, but I don't totally understand what you are trying to do.  I did understand that you don't want to drop a BO on the form, which is fine.  You can programmatically set a data source to a grid, or any other object for that matter, if you are wanting to create the BO in code and then set it at run-time.  It would just be a matter of setting the DataSource of the grid to a BBS that wraps the BO.  You can create this dynamically in code and then attach it so that you do not have to drop it on a form.</description><pubDate>Fri, 04 Apr 2008 09:23:51 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Business Binding Source DataSource Property</title><link>http://forum.strataframe.net/Topic15374-6-1.aspx</link><description>Standart Binding Source component has Datasource property. This is used to give a type for the control like a grid in design time. Then, At runtime an instance (Datatable) is binded to a control.&lt;/P&gt;&lt;P&gt;We are using Business Binding Source to bind an object to Devexpress Grid. &lt;/P&gt;&lt;P&gt;In my case, I have an instance object (Companies). But I have to drop that type of object on the form for informing the Devexpress grid. At Design time, I can easily manage the columns etc.&lt;/P&gt;&lt;P&gt;Is there any way to accomplish this without dropping Business Object on the form?</description><pubDate>Fri, 04 Apr 2008 06:43:25 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item></channel></rss>