seek-problem


Author
Message
Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Edhy,

<< have cases where I used the ChildFormDialog with no BO to do some process and simply return OK or Cancel, so that is the beauty of the ChildFormDialog that it will not lock you to use it for one purpose only. >>

Thanks for that nice idea.

Best regards

Thomas



 
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Thomas,

Thomas Holste (8/22/2012)
...so I don't understand why I should there use a childformdialog when it is (now, following Trents advice) working?

You don't have to use a ChildFormDialog in all situations.  I was simply explaining how I use it and I prefer to stick with the framework tools as much as I can for several reasons, one of them to keep the source code as standard as possible.  I have cases where I used the ChildFormDialog with no BO to do some process and simply return OK or Cancel, so that is the beauty of the ChildFormDialog that it will not lock you to use it for one purpose only.

Edhy Rijo

Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Edhy,

thanks for your explanations. I dio something similar with some forms like my customer- or my article-editing-forms which can be called from different places and this is working fine. All these forms have in common that the tables used on the childform are alo used on the parent form and the childformdialog does the translation to the childform.

But in this special case which started the thread I don't use the lookup-data (supplier-codes) on the parent-forms which call the lookup-form, so I don't understand why I should there use a childformdialog when it is (now, following Trents advice) working?

Best regards

Thomas
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Thomas,

Thomas Holste (8/17/2012)
I wonder if I have understood the conceot of the childformdialog. I use use them when I call forms to edit daa, which is presented on a parent form in some kind of "gridmode". The user selects a record and then edits it.


As Trent says
You can still call it from many different places.
.  As all SF controls, they have a specific purpose, but they are also design to be used in many scenarios, same with the Business Objects, ChildFormDialogs are awesome and flexible, you don't have to use it just to modify a single record, you can do whatever you want, ex: I have cases where I need to modify a child record from different parents in different forms and different child BO, so I do the following:
  1. Create a form form with a Themed Panel
  2. Drop an instance of each child BO, ex BO1, BO2, BO3
  3. Add a Panel Page per each child BO I want to modify and add my controls as usual.
  4. In the constructor create a parameter based on a public enumeration that will control which page to activate.
  5. Override the Onload as suggested by Trent and then set the PanelManager's ActivePage based on the enumeration value, also set the form's PrimaryBusinessObject to the BO you want to work with.
  6. In the Parent forms, add a ChildFormDialog, select your form and most important, create a translation for the child BO you will be using.  Add a parameter based on the public enumeration in step 4 and you are done!
Again, these are just steps from my mind, so they may not be all needed, but bottom line is to show you that with SF you can think out of the box and be very creative.  I do sort of the same thing with the ListView automations to handle the Add process and instead of showing a child form, I do other stuff.

Edhy Rijo

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
You can still call it from many different places.  There is a BO that you have on your child form that is bound to your controls.  When you use the ChildFormDialog, it "translates" the BO on your child form to the reference on the parent form.  So the form itself is encapsulated and the ChildFormDialog wires everything up in the Onload of the child form.

So you can still call this same form from many different places because when you call it, you still want to populate the child with the data from whatever parent form you are calling it from.
Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Edhy,

I wonder if I have understood the conceot of the childformdialog. I use use them when I call forms to edit daa, which is presented on a parent form in some kind of "gridmode". The user selects a record and then edits it.

This lookup-form I am building right now is intended to be callend from many different places, so I thought the easiest and best way is to have it independent from the different forms from which is it called. The data which is used for lookup is not being used on the parent forms so I would have tio setup the BO on each parentform and establish the childformdialog.

Best regards

Thomas
Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Trent,

thanks a lot. Navigate makes it work like I want it.

Best regards

Thomas
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
The "record-pointer" of the BO is in the right position, which means, the searched row, but the currentrow of the grid is the first row in the BO. How can I synchronize this. I tried the grids refresh-method, but this does not work.


Remember that a Navigate actually refreshes the UI whereas the Seek doesn't.  So you may want to rework your code to try a Navigate and see if that gets you what you wanted.

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Thomas,

You are welcome!!!

Thomas Holste (8/16/2012)
The only thing I am still struggling with is to find out how to refresh the datagridview with which the BO is connected with a BusinessBindingSource


I know you are making an effort on this to work, but honestly the best way to handle a child form is using the ChildFormDialog and BO Translations.  About your DataGridView, the BusinessBindingSource should take care of synchronizing the CurrentRowIndex,  I use DevExpress grids, and that is the behavior I see, it could be something different with the DataGridView.

Edhy Rijo

Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Edhy,

thanks for the idea of using a childformdialog, I will have a closer look at it.

Best regards

Thomas
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