Navigation with the MaintenanceFormToolStrip Control


Author
Message
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 removed the default control on the DevEx maintenance form and replaced it with the MaintenanceFormToolStrip control.  I have done this before without any issues.  Today, however, I have issues.  (Let's not dwell on that statement, ok?  Hehe )

My problem is that the window opens up without the navigation buttons lit up.  I can edit/add or delete, but not navigate.  If I do click edit, then undo, I have navigation back.  If I force the BO to navigate to the end of the collection (MoveLast) via code (FormLoad event), then the navigation buttons show up, but the FIRST record is showing on the screen...not the last...and the details in a list view reflect the LAST record...not the first.  This is quite odd.  If I then navigate away from the record, everything snaps back into shape and works as expected after that.  The workaround is quite simple and acceptable for little 'ole me, but not so acceptable to those nutty QA guys.  And, my boss just may mention something about it, too.

Is there a particlar property that I need to look at; or, perhaps I may have done something in my code to make this behavior occur?  Any direction on this would be much appreciated!

Thanks,
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
Well, well, well...

I removed all of the forced navigation, hit F5, opened the form, and it works.  Blink

Maybe it is because I just had a Tacquito from 7-Eleven!?!  All hail the Tacquito!

Weird.  Just plain weird.  If anyone has an explanation, I would be happy to field it.

Thanks,
Bill

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
All hail the Tacquito!

I would hail anything that fixed a problem Smile

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.

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!
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
I have deleted the maintenance tool strip and recreated it.  No effect.
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
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

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
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)

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