How do I maintain Alpha Order on a Maintenace Form


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
After I reread the help on sorting I found out that it is set programmatically and not by the property box. I tried setting it right after I called my fillallcowboys() but now I get a couple of the records and not the others. When I go to get out of the form it asks me to save data when all I have tried to do is move around in the table. ??? TIA.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
When I go to get out of the form it asks me to save data when all I have tried to do is move around in the table.

Either you have the business object in Edit or Add mode or the business object is somehow getting dirty (some property set is firing) and making the business object dirty. 

To figure out what's causing it, add a handler to the business object's IsDirtyChanged event and put a break point in the handler.  When the break point is hit, check the call stack and you should be able to figure out what caused the business object to think that it's dirty.

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
OK I will do it. Thanks. I will let you know what I find.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Excellent.  If the issue it not apparent when you look at the stack trace, then just post it here and we might be able to help you with the sleuthing.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I was not sure exactly what to put in the IsDirtyChanged event so I just put a local buff = 1 after I dim it as an integer with a break point. The follow are the call stacks that showed as it was finally loading the form and after I hit a navigation buttorn.



****

Lighting5.exe!Lighting5.CustomerEdit.CustomersBO_IsDirtyChanged(Object sender = {LightingBO.CustomersBO}, System.EventArgs e = {System.EventArgs}) Line 5Basic



Lighting5.exe!Lighting5.CustomerEdit.CustomersBO_ParentFormLoading() Line 10 + 0x15 bytesBasic

****



I hope this is what you wanted. Since I am new to .NET and Strataframe I am doing both the best I can at this time. Let me know if you want more. Is there a way to copy the entire Stack Call? TIA.



StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yep, it looks like the last thing from your code that was called before the IsDirtyChanged was fired is the ParentFormLoading event.  Do you have any code within your ParentFormLoading that might be setting a value within one of the business objects?
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Yes I have the following code.



****

Me.CustomersBO.fillallcustomers()

****

This is what I use to fill the BO. "Select * from cowboys"



?? TIA
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
OK, something deep down seems to be modifying the record within the business object... you'll need to turn off "Just My Code" in order to see all of the stack trace (including the .NET methods and SF methods). 

VS Menu -> Tools -> Options -> Debugging -> General -> Uncheck "Enable Just My Code" -> OK

Now, when you hit the breakpoint in the IsDirtyChanged handler, you should have a lot more in your Call Stack window that might give us a clue to the problem.

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
OK I just started over with a new project and added a few fields at a time and I think I have it working but I have some questions about a datetimepicker. I wanted to use it as a time stamp as to when a record was created so on a maintenance form I would need it enabled on new but on edit I would not. Is that feesible?

And that is what seems to be creating the grief even on the new project. If I enter it say on an edit and don't pick a date it seems to leave the record Dirty? Is that correct or is it something else? I have not checked the help yet but since I am here is there a way to default the datetimepicker to the current date?

TIA again and again.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you want to independently control the enabled state of that control, then you will want to set the IgnoreUIReadOnlyState to True on the control... this will cause the business object to leave it alone when it's enabling/disabling the controls when the object is edited/added/saved.  You would then need to control when that control is enabled.  I'm not sure what's causing it to think that the record is dirty, but if you disable the control when you're not wanting to edit the record, then it shouldn't copy any data back to the control.

If it's still causing you issues after you set the enabled state manually, then let me know.

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