﻿<?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?)  » Accessing BusinessBindingSource Data</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 17:46:53 GMT</lastBuildDate><ttl>20</ttl><item><title>Accessing BusinessBindingSource Data</title><link>http://forum.strataframe.net/FindPost31180.aspx</link><description>I am using a Devexpress grid with a BusinessBindingSource as the Source of the data linked to a SF BO. Most of the time this works fine. However, when I delete a Row, and I want to view an 'Unbound' field, I am getting errors. In Devexpress terms, an Unbound Field is where the Value is not directly in the table, but a Piece of Code is run to return the field. This code is put into a 'CustomUnboundColumndata' event .&lt;br/&gt;&lt;br/&gt;When I run similar code, using a Bog Standard Windows BindingSource as the Data Source, data is returned fine, so I am assuming I am not taking care of some differences betwee the Windows BindingSource and the SF BuisnessBindingSource.&lt;br/&gt;&lt;br/&gt;The code below runs fine using a Windows Binding Source , but when using te SF BusinessBidingSource, Null gets into the rowView, and so an error is thrown&lt;br/&gt;&lt;br/&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;private&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&lt;font color="#000000"&gt; gridView1_CustomUnboundColumnData(&lt;/font&gt;&lt;span style="color: blue;"&gt;object&lt;/span&gt;&lt;font color="#000000"&gt; sender, DevExpress.XtraGrid.Views.Base.&lt;/font&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;CustomColumnDataEventArgs&lt;/span&gt;&lt;font color="#000000"&gt; e)&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;GridView&lt;/span&gt;&lt;font color="#000000"&gt; view = sender &lt;/font&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;GridView&lt;/span&gt;&lt;font color="#000000"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; (e.Column.FieldName == &lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"Unbound"&lt;/span&gt;&lt;font color="#000000"&gt; &amp;amp;&amp;amp; e.IsGetData)&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;IList&lt;/span&gt;&lt;font color="#000000"&gt; source = view.DataSource &lt;/font&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;IList&lt;/span&gt;&lt;font color="#000000"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;font color="#ff0000"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;&lt;font color="#ff0000"&gt;DataRowView&lt;/font&gt;&lt;/span&gt; rowView =source[e.ListSourceRowIndex] &lt;font color="#ff0000"&gt;&lt;span style="color: blue;"&gt;&lt;font color="#ff0000"&gt;as&lt;/font&gt;&lt;/span&gt; &lt;/font&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;&lt;font color="#ff0000"&gt;DataRowView&lt;/font&gt;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;e.Value = rowView[&lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"FirstName"&lt;/span&gt;&lt;font color="#000000"&gt;]+ &lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"Test"&lt;/span&gt;&lt;font color="#000000"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin: 0cm 0cm 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;"&gt;&lt;font color="#000000"&gt;Anybody doing something similar with Devex (i.e. running CustomeUnboundColumnData event), or know how to amend the above in a SF BusinessBindingSource scenario&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Thu, 03 May 2012 02:53:08 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Accessing BusinessBindingSource Data</title><link>http://forum.strataframe.net/FindPost31183.aspx</link><description>Hi Edhy. Thnaks for replying.&lt;br/&gt;&lt;br/&gt;Initially&amp;nbsp; I had tried using Custom Field Properties but found for my purpose that Unbound Columns worked better, e.g. If I add a Row to the Grid, it automatically runs the unbound code populating the Lookup field without having to insert additional code. I also had some issues with the Custome Fields (Cant remember exactly what thy were now)&amp;nbsp; but decided on the Unbound Field as a more flexible alternative to polulate 'unbound' columns.&lt;br/&gt;&lt;br/&gt;Also, I tend to avoid Null fields also&lt;br/&gt;&lt;br/&gt;I think my problem here is that the Windows Binding Source&amp;nbsp;is returning an Ilist which has the colums/row whereas perhaps the&amp;nbsp;SF BusinessBindingSource returns someting different</description><pubDate>Thu, 03 May 2012 02:53:08 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Accessing BusinessBindingSource Data</title><link>http://forum.strataframe.net/FindPost31181.aspx</link><description>Hi Gerard,&lt;br/&gt;I use DevExpress grids but I have not tried using an Unbound column, instead I create a Custom Field Property in the BO which will be shown as a column in the grid via the SF BindingSource.&lt;br/&gt;Also I noticed that the DevEx grids don't like having SF BO properties with null values, so I had to return and Alternate value on Null via the BOM for each field.&lt;br/&gt;Hope this help you in this case.</description><pubDate>Wed, 02 May 2012 17:21:42 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>