Title: How to reload data to dependant combobox inside a grid ? Post by: wel on January 09, 2016, 12:03:36 PM I have a grid that has two dependant comboboxes and I am trying to make the second combobox reload its data when the first one change selection so I wrote this code:
Code: <th data-options="field:'work_group_id',width:20, The problem I get JS error that loc_ed is null in the line $(loc_ed.target).combobox('reload', url); !! please advise Title: Re: How to reload data to dependant combobox inside a grid ? Post by: jarry on January 10, 2016, 04:58:35 PM Please use 'onBeginEdit' event to get the editors and bind their dependent events. This tutorial shows how to create two dependent editors.
http://www.jeasyui.com/tutorial/datagrid/datagrid15.php Title: Re: How to reload data to dependant combobox inside a grid ? Post by: wel on January 10, 2016, 07:55:39 PM I have a problem, I tried to write the code like in the example but using onSelect event but the first combobox text is disappear when I start edit and change selection, also the data for the first combobox is loaded twice why is that ?
Here are the code I used: Code: $(function(){ And the columns Code: <th data-options="field:'work_group_id',width:20, And here is a video demonstrate the problem, please advise https://vid.me/JUex Title: Re: How to reload data to dependant combobox inside a grid ? Post by: jarry on January 11, 2016, 01:33:26 AM Please try this code instead.
Code: onBeginEdit:function(index,row){ Title: Re: How to reload data to dependant combobox inside a grid ? Post by: wel on January 11, 2016, 10:14:58 AM Many thanks Jarry you saved my day.
|