Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ReadOnly BO's
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01223268
Message ID:
01224677
Vues:
23
Hi!

The Following does not seem to work properly.

On my Form on the First Tab Page I have three Grids (Parent-Child-GrandChild) all related "this.oParentBO1.RegisterChildBizObj(this.oChildBO2)" etc. and on the Second Tab Page I have other Unrelated Controls one of them is a grid and the other a set of TextBoxes. So I have 5 BO's on that Form.

On Page1: BO's are related to each other
BO1 = Grid (Parent) - > Table A
BO2 = Grid (Child) - > Table B
BO3 = Grid (GrandChild) - > Table C

On Page2: BO's are not related any other BO
BO3 = Few TextBoxes - > Table D
BO4 = Grid - > Table D

In every Grids Enter Event I call "this.RegisterPrimaryBizObj(...)" + this.NavControl = ..." and in every Grids Leave Event I call "this.RegisterPrimaryBizObj(...)" + this.NavControl = ..." and set it back to the real PrimaryBizObj (Parent).

e.g.
private void grdParentBO1_Enter(object sender, EventArgs e)
{
   this.RegisterPrimaryBizObj(this.oParentBO1);
   this.NavControl = this.grdParentBO1;
}

private void grdChildBO2_Enter(object sender, EventArgs e)
{
   this.RegisterPrimaryBizObj(this.oChildBO2);
   this.NavControl = this.grdChildBO2;
}

private void grdGrandChildBO3_Enter(object sender, EventArgs e)
{
   this.RegisterPrimaryBizObj(this.oGrandChildBO3);
   this.NavControl = this.grdGrandChildBO3;
}

private void grdAnotherParentWithNoChildrenBO5_Enter(object sender, EventArgs e)
{
   this.RegisterPrimaryBizObj(this.oAnotherParentWithnoChildrenBO5);
   this.NavControl = this.grdAnotherParentWithnoChildrenBO5;
}
I problems that I see are:
1] When I click into a grid the toolstrip does not correctly refresh itself. The first/next/prior/last buttons are not enabled/disabled properly based on the values of the current grid. Once I move to another row in that grid then the toolstrip works ok. Is there a way for me to refresh the ToolStrip?

2] Adds in the toolstrip also don't work as well.
3] How do I handle textboxes or other controls that are not in a grid? Do I need to put this code in each controls Enter and Leave Events?
4] Is the "this.NavControl = this.grdParentBO1;" also required?

To get all this to work with a common tool strip seems to be a bit of extra code is there a cleaner way to do this or is it better to not have a common toolstrip.

Thanks

Sarosh


>
>Not as long as you change it back to being the primary business object when the other control loses focus.
>
>>I would like the CustomerDetailForm to be Modal and to be the CustomerForm's child form but still be within the MDI Application's Window.
>
>Then you just need to set the CustomerDetailForm's MdiParent property to MainForm.
>
>Best Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform