How do I maintain Alpha Order on a Maintenace Form


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Since the control is bound to the field on the business object, it is going to pull its value from the business object, so the best way to default it to the current date will be to set the field on the business object in the SetDefaultValues method to todays date.  DateTime.Now will work, or if you don't want the time, then DateTime.Now.Date.
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I really don't want to control it so I will play with it some more and see if I can isolate that it is this control giving me the wierd results.  Is there a way to default the datetimepicker to the current date? TIA.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K 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.

Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K 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 (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K 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
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K 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 (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K 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
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K 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 (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K 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
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
OK I will do it. Thanks. I will let you know what I find.
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