Navigation with the MaintenanceFormToolStrip Control


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Glad you got it going.  Smile
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
Well, it might not be an answer, but it's a reply at least Wink
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
Check the answer on the cross post Smile
Bill Cunnien
Bill Cunnien
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: 785, Visits: 3.6K
The first thing that the EditValueChanged event needs to check is the editing state of the BO.  If adding or editing, then the code can run; otherwise, it should skip it.  The editing state will be changed by the following line of code:

this.partsBO1.sketch = (byte[])SketchPictureEdit.EditValue;

That is why my navigation disappeared.  And, also explains the confirmation popup when closing the window.

Whew!  Glad that's over.
Bill

(note: cross-posted on purpose--http://forum.strataframe.net/Topic13645-7-1.aspx)

Bill Cunnien
Bill Cunnien
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: 785, Visits: 3.6K
Wow!  The code that I added to fix one problem (http://forum.strataframe.net/Topic13645-7-1.aspx) has created this one.  That's no fun.  Why would this code...

private void SketchPictureEdit_EditValueChanged(object sender, EventArgs e)
{
   
if (SketchPictureEdit.EditValue == new byte[] { })
    {
       
this.partsBO1.sketch = new byte[] { };
        SketchPictureEdit.EditValue =
string.Empty;
    }
   
else
   
{
       
this.partsBO1.sketch = (byte[])SketchPictureEdit.EditValue;
    }
}

...prevent the navigation from working.  I don't see the connection.

Bill Cunnien
Bill Cunnien
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: 785, Visits: 3.6K
Hey Ivan,

Nope.  No date fields on this form.

The issue reported here (http://forum.strataframe.net/Topic13178-10-1.aspx) pops up every time I make a change to this form, too.  Quite annoying.

Oh, I did revert my changes on this form to last night (via VisualSVN...glad I added this all in to source code control yesterday).  It works.  Now, I am adding all my changes back in--one at a time--in order to see which one may have broken the form.  Tedious, but I need to find an answer so that I do not duplicate my problem elsewhere.

Bill

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hey Bill.

Just guessing. Have you got a DateTimePicker dropped on your form trying to deal with a NULL date?

Bill Cunnien
Bill Cunnien
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: 785, Visits: 3.6K
I have deleted the maintenance tool strip and recreated it.  No effect.
Bill Cunnien
Bill Cunnien
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: 785, Visits: 3.6K
Ben Chase (01/15/2008)
All hail the Tacquito!
My only guess is that it had something to do with the initialization priority of the objects on the form... the business object is supposed to raise a Navigated event when the form launches to set the initial state of all of those objects.  Looks like that wasn't happening, or the handler wasn't attached when it did happen.  I dunno; at least it's working for you.

I am having the same problem, again.  This has got me stumped.  I will open the window and the first record is shown.  No navigation is availble on the MaintenanceFormToolStrip.  There are quite a few records.  If I browse and select the first record of 100s, I'll get that record, but no navigation still.  It is as if the toolstrip does not know about the primary BO.

The initialization priority does not seem to be the key here.  I have tried playing with a few options to try to get this to work.  Nothing has been successful.  My last option will be to delete the toolstrip and start over.

One other oddity...the form opens in an idle editing state.  Nothing is lit up to edit; however, if I choose to close the window the default popup shows up asking if I want to save changes?  There have been no changes, nor has the editing state been altered...it is still idle.  I am thinking that the primary business object is no longer primary, even though it is showing up that way. 

Odd, huh?
Bill

Bill Cunnien
Bill Cunnien
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: 785, Visits: 3.6K
Init priority...ok, I'll go with that.  Sounds like the most likely cause.  Thanks, Ben!
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