﻿<?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 » Issues  » FieldName property not working on EnhancedList</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 18:06:30 GMT</lastBuildDate><ttl>20</ttl><item><title>FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2556.aspx</link><description>When I try to access the FieldName property for a specific column in an EnhancedList control I am not getting the correct value.&amp;nbsp; I get Col0, Col1, Col2, and so on instead of the correct FieldName values.&amp;nbsp; I really need this as I would like to access&amp;nbsp;a column&amp;nbsp;based on the FieldName and I don't know what index it will be.&amp;nbsp; I tried this in DevExpress and it worked correctly, so it is probably something to do with what's going on in the Population of the grid from the BO.</description><pubDate>Tue, 05 Sep 2006 13:25:34 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2636.aspx</link><description>You could also change the CheckCurrentRowBeforeNavigate property to false so that the business object will not check the business rules on the row before it attempts to navigate the CurrentRowIndex.&amp;nbsp; The business rules would still get checked before it saves, though.</description><pubDate>Tue, 05 Sep 2006 13:25:34 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2627.aspx</link><description>I have it figure out.&amp;nbsp; I was Navigating by primary key on&amp;nbsp;a FocusedRowChanged event, but the grid was firing that event when the data source was changing so it was trying to navigate when it shouldn't have been.&amp;nbsp; I changed the event to a click so it would only be on user interaction.&amp;nbsp; Works great now.</description><pubDate>Fri, 01 Sep 2006 15:56:44 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2626.aspx</link><description>When I create a new record, it creates a blank row in the grid before I have saved it.&amp;nbsp; I think this is causing my index out of range problem.&amp;nbsp; What in the BO is causing this to happen in the grid?&amp;nbsp; I don't understand how these work together...I thought it would be the same as the EnhancedList since it was inherited.</description><pubDate>Fri, 01 Sep 2006 15:18:25 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2624.aspx</link><description>Now that I have this setup with the DevEx grid I'm getting some completely different behaviors than I was with the EnhancedList.&amp;nbsp; For example, I create a new record and go to input the data into my bound fields.&amp;nbsp; I&amp;nbsp;select a date&amp;nbsp;from a drop-down and it checks the business rules when I do the selection instead of when I call save.&amp;nbsp; I'm not sure how this is happening, but it's causing the red error icons to pop up before I actually save.&amp;nbsp; I can't input everything in before it starts&amp;nbsp;popping error icons.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Also, If I create a new record and then undo it gives me an error sayig that the current row is out of range.&amp;nbsp; This is true because for some reason it's hanging on to the new record it creates.&amp;nbsp; I'm not sure what the difference in the interaction is between the GridControl and the&amp;nbsp;BO vs. the EnhancedList and the BO, but it's very different and I'm not sure where I'm going wrong getting these to work together.&amp;nbsp;</description><pubDate>Fri, 01 Sep 2006 14:17:43 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2623.aspx</link><description>It depends.&amp;nbsp; In some circumstances you may have to call the refresh.</description><pubDate>Fri, 01 Sep 2006 12:11:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2622.aspx</link><description>Great, I got it working.&amp;nbsp;&amp;nbsp;Does that mean&amp;nbsp;the grid&amp;nbsp;will automatically refresh when the BO changes if you use a BusinessBindingSource?&amp;nbsp; No calling RefreshDataSource?</description><pubDate>Fri, 01 Sep 2006 11:51:15 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2621.aspx</link><description>You will want to use a BusinssBindingSource control.&amp;nbsp; Simply drop it on the form and then select the BO it is supposed to wrap.&amp;nbsp; This basically emits each row with the strong-typed field properties and supports the two-way data-binding as well.</description><pubDate>Fri, 01 Sep 2006 11:32:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2619.aspx</link><description>Ok, so now I'm switching all these EnhancedList controls over to a straight DevExpress GridControl....thank god for inheritance!&amp;nbsp; I am having a problem though (surprise).&amp;nbsp; I am setting the data source to my BO's CurrentDataTable, but it's not populating correctly.&amp;nbsp; It almost like the rows are all there but the data isn't showing up in them.&amp;nbsp; I can scroll down and select through the grid, but the cells are blank.&amp;nbsp; The DataTable shows data when I look at it in debug, but something's not going right with the population.&amp;nbsp; Is there something else I need to do with the BO besides set the CurrentDataTable as the DataSource?&amp;nbsp; There used to be something like IsListSource, but that's gone now...is there something else?</description><pubDate>Fri, 01 Sep 2006 11:26:57 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2592.aspx</link><description>Well, the primary key field must be added as a column within the PopulationDataSourceSettings, or you will not be able to select it out of the columns.&amp;nbsp; In fact, the DataTable that is dynamically created to be the DataSource of the EnhancedList will not even contain the primary key value.&amp;nbsp; You're best bet might to be to use the basic DevExpress GridControl without the EnhancedList and just create a business object that contains the data you need and set it as the DataSource of the grid (through a BusinessBindingSource) which will allow you to control everything that is visible/non-visible within the grid and also control the column names themselves.</description><pubDate>Thu, 31 Aug 2006 10:53:35 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2585.aspx</link><description>Let me just add something further to explain this.&amp;nbsp; This post is actually stemming off Post#2537 where I'm trying to keep the focus from moving to the top of my EnhancedList after a requery.&amp;nbsp; That's why I started trying to do this code.&amp;nbsp; Also to note here is that my primary key field is not a visible column.&amp;nbsp; With DevExpress you can still access this column even though you can't see it.&amp;nbsp; But, with the EnhancedList that column won't be a part of DisplayFieldNames or FormatColumns or anything to do with the PopulationDataSourceSettings except for the Tag field.&amp;nbsp; I'm not sure where to go with this, but I have to make it work.</description><pubDate>Thu, 31 Aug 2006 09:33:29 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2583.aspx</link><description>That won't quite work. You're trying to use the BusinessObject.PrimaryKeyField as an Integer index into the DisplayFieldNames array.&amp;nbsp; It's just a string value for the Primary Key field name.&amp;nbsp; I guess I'm not understanding how these things work together.</description><pubDate>Thu, 31 Aug 2006 09:20:24 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2571.aspx</link><description>You could do it like this:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;With&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.EnhancedList1.PopulationDataSourceSettings&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me&lt;/FONT&gt;&lt;FONT size=2&gt;.GridView1.LocateByValue(0, _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.GridView1.Columns(Array.IndexOf(.FormatColumns.ToArray(), _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "{" * &lt;/FONT&gt;&lt;FONT size=2&gt;.DisplayFieldNames.IndexOf(BusinessObject.PrimaryKeyField).ToString() &amp;amp; "}"&lt;/FONT&gt;&lt;FONT size=2&gt;)), Value)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;With&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;It will use the population data source settings to determine the column that contains the primary key field.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 31 Aug 2006 00:33:27 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2568.aspx</link><description>Ok, then how would you suggest that I accomplish this piece of code instead?&amp;nbsp; This is done at a base form level and I need it to be generic. I won't necessarily know what column number goes with what field or populated value.&lt;/P&gt;&lt;FONT color=#008000 size=2&gt;&lt;P&gt;gridView.FocusedRowHandle = gridView.LocateByValue(0, gridView.Columns(BusinessObject.PrimaryKeyField), Value)&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 30 Aug 2006 20:44:08 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: FieldName property not working on EnhancedList</title><link>http://forum.strataframe.net/FindPost2561.aspx</link><description>Yes, we name the colums Col# because each column can be a concatenation of multiple fields, and it is not always just one field.&amp;nbsp; The only way to determine which field is stored within which column is to check the population data source settings and see which column maps to which field.</description><pubDate>Wed, 30 Aug 2006 18:17:14 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>