1 (edited by thezimguy 2018-08-24 22:41:59)

Topic: [SOLVED] ComboBox not loading saved data on first time edit

Hello Dmitry, Derek and MVD lovers
Please take a look at this
1. Run any of the example projects (EquipmentInventory)
2. Click on search to load some data
3. Double click on any record to edit

You will notice that for the first time the comboBox will not load any data.
But subsequently, it loads the data
Any fix?
https://s6.postimg.cc/lngtn3gpt/1st_Time_Edit_No_Combo_Load.png
Regards

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

Hi,
It works okay for me (I tried it with the Phone Book and the Equipment Inventory applications).
Derek.

3 (edited by thezimguy 2018-08-24 21:40:35)

Re: [SOLVED] ComboBox not loading saved data on first time edit

Please, I am using 4.6 beta
Is it the same as what you are using?
It does not load the combo for the first attempt to edit but when I close the edit form and double click it again then it loads it
I really appreciate your help

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

You found a bug. Thank you.


Please download fixed version
https://www.dropbox.com/s/wutj7mnux7f3a … a.zip?dl=0

Dmitry.

5 (edited by thezimguy 2018-08-24 22:35:28)

Re: [SOLVED] ComboBox not loading saved data on first time edit

DriveSoft wrote:

You found a bug. Thank you.


Please download fixed version
https://www.dropbox.com/s/wutj7mnux7f3a … a.zip?dl=0

Great.
It is fixed
Thank you

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

Hi friends
Please how do I disable the close[x] button on a form so that I can use the normal button placed on the form to close the form.
Thank you

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

Hello Dmitry, Derek and MVD Users
I Have a little problem. I am trying to use the 'Phone Book' example with adding multiple phone numbers at a time. Thus I want to be able to add more numbers before the form closes. So I unchecked the (Close the current form after saving). But I am getting errors in doing so.
Any help of fix?

1. Open Phone example
2. Move to frmNumber(Form) -> OK(Button1) -> Action(Properties)
3. Uncheck (Close the current form after saving) -> OK
4. Run Project -> Click on 'Search' -> Double click to edit any entry in the table Grid
5. Click on 'Add number' (button)
6. Add a new number -> try to add another number

Regards

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

Hi,
There are a couple of ways to disable the close(x) buttons involving the form object properties so it's worth trying combinations till you find the one that suits you best.
For me, I would select 'bsdialogue'  from the 'borderstyle' property and remove the ticks from all the 'bordericons' property (see attached screen shot and project).
Regards,
Derek.

Post's attachments

Attachment icon formatting 2.zip 461.68 kb, 357 downloads since 2018-09-07 

9 (edited by thezimguy 2018-09-07 10:46:51)

Re: [SOLVED] ComboBox not loading saved data on first time edit

derek wrote:

Hi,
There are a couple of ways to disable the close(x) buttons involving the form object properties so it's worth trying combinations till you find the one that suits you best.
For me, I would select 'bsdialogue'  from the 'borderstyle' property and remove the ticks from all the 'bordericons' property (see attached screen shot and project).
Regards,
Derek.

Thank you Derek for your quick response. I am able to achieve the effect you described but my problem is, I want to have the minimize and the maximize icons there. I only want the close to go off.

Is there a way to achieve that?

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

Thanks Derek
There seems to be no attachment
Please check
Regards

@thezimguy

Re: [SOLVED] ComboBox not loading saved data on first time edit

Hi,
When you do it the standard MVD way, MVD passes through the person.id to the 'numbers' table each time the form is opened.  But do it repeatedly without closing and re-opening the form, then the person.id is not passed through on second and subsequent occasions - hence the error message you get.
But you can add it to the form manually.  A slight complication comes when you are adding multiple phone numbers to a person who is currently being created so you have to find the very latest person.id with a bit of sql.
Have a look at the attached and see if it helps (and, as always with MVD, there will be other (better?) ways to do it).
Regards,
Derek.
.
(attachement now 'attached' - LOL!)

Post's attachments

Attachment icon Phone Book 3.zip 1.59 mb, 381 downloads since 2018-09-07 

Re: [SOLVED] ComboBox not loading saved data on first time edit

Really appreciated

@thezimguy