StrataFrame Forum

Very strange maintenance form issue

http://forum.strataframe.net/Topic11723.aspx

By Tim Dol - 9/27/2007

I'm not sure if this is just a one-off type of thing but I am experiencing a very strange issue with one of my maintenance forms. 

The form is very simple...It's a SF Maintenace Form with a few combo box fields and about 10 textbox fields. Nothing out of the ordinary and I do not have this issue on any other form.

I add one record... no problem. I then click on 'New' to create a second record. I fill part of the form and then all of a sudden it appears to automatically revert back to the first saved record, almost like an Undo was performed while in add mode.

I removed all the underlying code to ensure it wasn't something I was doing and it still does the same thing.

Any ideas?

Thanks,

Tim

By Trent L. Taylor - 9/27/2007

Well, there has to be something that is either firing an Undo, navigating the record, etc.  Have you tried adding a break point in the navigating event and then looking at the call stack?  You could also open up the SF source, build it in debug mode, and add a break point in the OnNavigating method in the BusinessLayer class.  You could then look at the call stack and meybe get an idea of what is firing.  I have never heard of anything like you are describing so there has to be some event that is being raised/handled or an Undo called make this happen.
By Tim Dol - 9/27/2007

I created a brand new form with 5 of the fields. There is no code at all behind the form.  I bind the 4 fields and I still have the exact same issue.  I will try the debug route to see what's happening.

Thanks

Tim

By Trent L. Taylor - 9/27/2007

True, but I think that the logic that is causing the problem is in the BO.  This kind of points in that direction since the problem followed the BO on a blank form.
By Robin J Giltner - 9/27/2007

I had that problem pop up in a few spots and was always a byproduct of my sort on the business object. Once I turned sorting off on EditingStateChanged, that stopped happening. But if you aren't setting the sort on the form, that may not be the problem.



Robin Giltner
By Tim Dol - 10/3/2007

That's exactly what it was Robin. I set the sort after filling the BO which seemed to cause the problem. I'm not sure why I did this in the first place.

Thanks

Tim

By StrataFrame Team - 10/3/2007

Yeah, when you have a sort or filter turned on on the business object, since the CurrentRow is specified by the CurrentRowIndex, as the data changes in the business object and the records are resorted, the CurrentRow can change from one record to another record because the rows are reordered, but the CurrentRowIndex says the same.
By Edhy Rijo - 10/3/2007

Robin J Giltner (09/27/2007)
I had that problem pop up in a few spots and was always a byproduct of my sort on the business object. Once I turned sorting off on EditingStateChanged, that stopped happening. But if you aren't setting the sort on the form, that may not be the problem.

Robin Giltner

Hi Ben,

Then, just to be clear, the solution to this situation would be as recomended by Robin (see quote).