Topic: How can I show from Parental Combobox the valuse from a TableGrid

How can I show the values From a Parental Combobox selecting from a TableGrid?
In my other question (http://myvisualdatabase.com/forum/viewtopic.php?id=2919 )
Derek has found the solution but what's with the parentalComboboxes?
I attache my new example fro what I ask.

Thank you friend.

Post's attachments

Attachment icon example2.7z 275.75 kb, 397 downloads since 2016-12-03 

Re: How can I show from Parental Combobox the valuse from a TableGrid

Hello v_pozidis.
Please find attached your project with changes.
1.  There is a new line in the script.
2.  You only need to set the parent combobox property on frmcreateexample.combobox2;  you do not set it on form1.combobox2.
Hope this helps.
Derek.

Post's attachments

Attachment icon example2.zip 338.44 kb, 386 downloads since 2016-12-04 

Re: How can I show from Parental Combobox the valuse from a TableGrid

Yes but i my project I need to have the Parent ComboBox set in on the Form1,  The ComboBox MUST  be setup with the parnt, how can I do that ?

Re: How can I show from Parental Combobox the valuse from a TableGrid

Hello v_pozidis,
In that case, I suggest you don't use a script at all;  just add a button with 'show record' functionality, double-click the row in your tablegrid and the information (including the correct parent combobox functionality) will be displayed (see attached).
Derek.

Post's attachments

Attachment icon example2a.zip 337.56 kb, 380 downloads since 2016-12-04 

Re: How can I show from Parental Combobox the valuse from a TableGrid

I need the script with the parent combobox, and not this solution because in the future I will add the edit routine. Any idea?

Re: How can I show from Parental Combobox the valuse from a TableGrid

If I understand you correctly, I think you now want to add/change/delete records using only form1?
If so, look at the attachment (there are other ways).
You still do not need a script to get the parent combobox functionality to work - that is fixed simply by adding a 'show record' button, as I explained earlier.
However, I have added a small script to hide the 'save' button, unless you are in 'new record' or 'show record' mode.  I do this to stop duplicate rows being accidently created - something which can easily happen when you try to do everything on just one form.  But it is just a safeguard;  strictly speaking, you do not need this script either.
Maybe this is what you want now.
Derek.

Post's attachments

Attachment icon example3.zip 340.69 kb, 443 downloads since 2016-12-05 

Re: How can I show from Parental Combobox the valuse from a TableGrid

I have posted the answer in your previous theme.
http://myvisualdatabase.com/forum/viewtopic.php?id=2919

Dmitry.