SetDefaultValues changing the CurrentRowIndex


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Cool Cool
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Thanks!  That appears to have fixed the problems I was having. 
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I am in the middle of building and update and posting the next beta which will fix this issue.  There was no issue in regards to the EditingState.  The state doesn't get changed until AFTER the new row is added (which includes the defaults getting set).  So no issue there.  However, there was an issue with the currency manager position being out of sync.  This issue has been resolved and will be in the Posted Releases section later this morning.
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have created a sample project to speed this along.  If you click the add button, it does not clear out the values and go to a new row.  Instead it goes back to the selected row.  If you go to the code and clear out the value being assigned in the SetDefaultValues event handler, all works as expected.
Attachments
SetDefaultValuesBug.zip (121 views, 739.00 KB)
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Just to add to this a little bit, the EditingState does not change to Idle -- rather, it is in Idle EditingState when it enters the SetDefaultValues handler code.  It should be in Adding state at this point.  Also, the index that it is changing back to upon field assignment is the focused index when the add takes place.  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.
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
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.  In my case I have no sorting applied or filtering -- the Sort and Filter properties are both blank.  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.  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. 

What I have is code like this:

Private Sub HolidaysBO_SetDefaultValues
  Me.Date = Today
End Sub

I can set a breakpoint on the assignment line, and before the assignment the CurrentRowIndex is the newly added row.  As soon as the assignment is made and I step through the line of code, the CurrentRowIndex changes.  To go further, the EditingState is Idle when it should be Adding.  This was all working as designed until my upgrade, so I'm wondering if this is perhaps a bug?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search