﻿<?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?)  » SetDefaultValues changing the CurrentRowIndex</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 01:13:06 GMT</lastBuildDate><ttl>20</ttl><item><title>SetDefaultValues changing the CurrentRowIndex</title><link>http://forum.strataframe.net/FindPost21395.aspx</link><description>In my SetDefaultValues event handler in my business object, I am seeing the CurrentRowIndex change as soon as a field value is set in the SetDefaultValues handler.&amp;nbsp; In my case I have no sorting applied or filtering -- the Sort and Filter properties are both blank.&amp;nbsp; The scenario is that I have my business object used as a grid data source via a BBS, but I even tried clearing the grid sorting/filtering before adding a new row just to see if that was the cause.&amp;nbsp; I am seeing this across my application, and it appears to have just popped up since I upgraded to the beta version that Trent gave me of 1.6.7.&amp;nbsp; &lt;/P&gt;&lt;P&gt;What I have is code like this:&lt;/P&gt;&lt;P&gt;Private Sub HolidaysBO_SetDefaultValues&lt;BR&gt;&amp;nbsp; Me.Date = Today&lt;BR&gt;End Sub&lt;BR&gt;&lt;BR&gt;I can set a breakpoint on the assignment line, and before the assignment the CurrentRowIndex is the newly added row.&amp;nbsp; As soon as the assignment is made and I step through the line of code, the CurrentRowIndex changes.&amp;nbsp; To go further, the EditingState is Idle when it should be Adding.&amp;nbsp; This was all working as designed until my upgrade, so I'm wondering if this is perhaps a bug?</description><pubDate>Wed, 07 Jan 2009 15:33:22 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: SetDefaultValues changing the CurrentRowIndex</title><link>http://forum.strataframe.net/FindPost21435.aspx</link><description>Cool :cool:</description><pubDate>Wed, 07 Jan 2009 15:33:22 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SetDefaultValues changing the CurrentRowIndex</title><link>http://forum.strataframe.net/FindPost21415.aspx</link><description>Thanks!&amp;nbsp; That appears to have fixed the problems I was having.&amp;nbsp;</description><pubDate>Tue, 06 Jan 2009 16:38:12 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: SetDefaultValues changing the CurrentRowIndex</title><link>http://forum.strataframe.net/FindPost21408.aspx</link><description>I am in the middle of building and update and posting the next beta which will fix this issue.&amp;nbsp; There was no issue in regards to the EditingState.&amp;nbsp; The state doesn't get changed until &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;AFTER&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; the new row is added (which includes the defaults getting set).&amp;nbsp; So no issue there.&amp;nbsp; However, there was an issue with the&amp;nbsp;currency manager position being out of sync.&amp;nbsp; This issue has been resolved and will be in the Posted Releases section later this morning.</description><pubDate>Tue, 06 Jan 2009 10:10:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SetDefaultValues changing the CurrentRowIndex</title><link>http://forum.strataframe.net/FindPost21397.aspx</link><description>I have created a sample project to speed this along.&amp;nbsp; If you click the add button, it does not clear out the values and go to a new row.&amp;nbsp; Instead it goes back to the selected row.&amp;nbsp; If you go to the code and clear out the value being assigned in the SetDefaultValues event handler, all works as expected.</description><pubDate>Mon, 05 Jan 2009 12:55:42 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: SetDefaultValues changing the CurrentRowIndex</title><link>http://forum.strataframe.net/FindPost21396.aspx</link><description>Just to add to this a little bit, the EditingState does not &lt;EM&gt;change &lt;/EM&gt;to Idle -- rather, it is in Idle EditingState when it enters the SetDefaultValues handler code.&amp;nbsp; It should be in Adding state at this point.&amp;nbsp; Also, the index that it is changing back to upon field assignment is the focused index when the add takes place.&amp;nbsp; So, whatever item I had selected in the list when pressing the add button is the one it goes back to upon the default value assignment statement.</description><pubDate>Mon, 05 Jan 2009 12:47:39 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item></channel></rss>