I have a jquery grid with dropdown list. List items of dropdownlist should be changed according to operation in grid. When I edit existing row, js function "getSoortEditfuncWithAllListItems()" called. It's working fine and when I add new row ,js function "getSoortAddNewRowfuncWithOnlyActiveListItems();" called. This all happens in SelectRow event. But here problem is - If i first edited row, then dropdown in jquery filled with all (active and non active)items.Then if click on Add button for add new row,js function "getSoortAddNewRowfuncWithOnlyActiveListItems()" called,but this new list(only active items) not reflects in dropdownlist. It shows same All Active,nonactive list. If I click again on add button then it's shows only active items.
Не обновляется должным образом.
onSelectRow: function (id) {
var f1Val = $('#jQGridCountry').jqGrid('getCell', id, 'Soort');
if (f1Val.length > 0) {
var values = getSoortEditfuncWithAllListItems(); // This is for Edit
Row
alert(' var values = getSoortEditfuncWithAllListItems();')
jQuery('#jQGridCountry').setColProp('Soort', { editoptions: { value:
null}
});
jQuery('#jQGridCountry').setColProp('Soort', { editoptions: { value:
values }
});
}
else {
var values = getSoortAddNewRowfuncWithOnlyActiveListItems(); // This is
for Add New Row
alert(' var values = getSoortAddNewRowfuncWithOnlyActiveListItems();')
jQuery('#jQGridCountry').setColProp('Soort', { editoptions: { value:
null} });
jQuery('#jQGridCountry').setColProp('Soort', { editoptions: { value:
values } });
}
}
Для добавления новой строки - выпадающий список должен обновиться, а список активных элементов должен
заселить.