I want to refresh a select drop down on my edit form.
At the moment I have $("#SalesName").refresh
but this doesnt work. I have this in the colModel editoptions:{dataUrl:'SalesDropDownGrid.php'}.
Any help is appreciated.
Thanks
I want to refresh a select drop down on my edit form.
At the moment I have $("#SalesName").refresh
but this doesnt work. I have this in the colModel editoptions:{dataUrl:'SalesDropDownGrid.php'}.
Any help is appreciated.
Thanks
If you would use recreateForm: true option of the form editing then the edit form will be recreated every time when the user open the form. So the select will be filled with the items returned by "SalesDropDownGrid.php"
(from editoptions.dataUrl
).
If you would set Cache-Control: max-age=0
HTTP header in the response from "SalesDropDownGrid.php"
the results will be not cached and the select will be filled with the current list of "Salesman". If you have some problems with the setting of HTTP headers in your PHP code you can use alternatively
ajaxSelectOptions: { cache: false }
see the answer.