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.
Thanks in advance
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?