records added on the fly not autoatic selected in select

Questionsrecords added on the fly not autoatic selected in select
Massimo Gagliardi asked 9 years ago

I created a script that by an add dialog opens a secondary window (with its specific grid) to allow you to add, by an add dialog of the secondary grid, a new entry, if missing, in the select option of the first add dialog.
The script works with jQuery.post.
The new record is registered in the DB by the add dialog of the secondary window and when it is closed the value, by the same script above, it is available in the "select option" initial.
Everything seems to work … but you can not set the value automatically (selected index), it must select it.
By investigating with Firebug I saw that the new value (and its index) do not appear in the "select", even if they are selectable (perhaps that the select arent' refreshed after an update?).
By closing the add dialog the record is properly written with the new value set in the "select" (you can see it in the grid) but if you open the "edit dialog" phpgrid fails to set the value automatically in the option select.
I must do F5.

Suggestions?
Thanks in advance
Massimo Gagliardi

1 Answers
Abu Ghufran answered 9 years ago

Please email me code + db for review.

Your Answer

19 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?