﻿<?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 » Business Objects and Data Access (How do I?)  » cannot access this.Item in BO in c#</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 04:14:36 GMT</lastBuildDate><ttl>20</ttl><item><title>cannot access this.Item in BO in c#</title><link>http://forum.strataframe.net/FindPost10790.aspx</link><description>I'm trying to create a Custom Field.&amp;nbsp; I've created the public field in the BO, it will be filled by a stored procedure that joins accross tables.&amp;nbsp; I saw this done (today actually, thanks Trent!)&amp;nbsp;where the filled value was accessed in the getter using Item() like so&lt;/P&gt;&lt;P&gt;get&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Me.Item("DBColumnName");&lt;BR&gt;}&lt;/P&gt;&lt;P&gt;problem is I'm using c#, and I&amp;nbsp;don't have Item...&lt;/P&gt;&lt;P&gt;I use { return this.Item("DBColumnName") }&lt;BR&gt;(or even Item[]) but it's not there...&lt;BR&gt;&lt;BR&gt;I have CurrentDataTable, CurrentView, CurrentRowIndex, and CurrentRow but no Item.&lt;BR&gt;I compile I get the following error:&lt;BR&gt; Error&amp;nbsp;1&amp;nbsp;'BusinessObjectLib.Customers' does not contain a definition for 'Item'&amp;nbsp;&lt;BR&gt;&lt;BR&gt;I'm thinking&amp;nbsp;that should be in there, what silly thing am I doing wrong?</description><pubDate>Fri, 10 Aug 2007 11:15:00 GMT</pubDate><dc:creator>Rob Toyias</dc:creator></item><item><title>RE: cannot access this.Item in BO in c#</title><link>http://forum.strataframe.net/FindPost10805.aspx</link><description>I was so close, yet so far..&lt;/P&gt;&lt;P&gt;thanks for the info!</description><pubDate>Fri, 10 Aug 2007 11:15:00 GMT</pubDate><dc:creator>Rob Toyias</dc:creator></item><item><title>RE: cannot access this.Item in BO in c#</title><link>http://forum.strataframe.net/FindPost10798.aspx</link><description>Ah, the Item property is called the Default property in VB, which translates to the this[] (indexer) property in C#.&lt;/P&gt;&lt;P&gt;So, you should be able to access it with:&lt;/P&gt;&lt;P&gt;get&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this["DBColumnName"];&lt;BR&gt;}&lt;/P&gt;&lt;P&gt;If you have a reference to a BO and you ever need to access the field, you can do the same thing:&lt;/P&gt;&lt;P&gt;BOType mybo = new BOType();&lt;BR&gt;string value = mybo["someStringField"];&lt;/P&gt;&lt;P&gt;Just put the brackets directly after the reference, whether "this" or some bo variable.</description><pubDate>Fri, 10 Aug 2007 09:15:52 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>