Hi have a table to show from xmlString using jqgrid. the table has some rows, and there is a column which i want to get dynamically. the select box can contain values based on db output, say values: textbox, textarea, radiobox.. it can have all or few as per enrty in db.
now i want to load the drop down with these values on inline editing. i am able to do tha开发者_如何学运维t. Problem arises when editoption values does not match one of the values selected.
For example i selected radiobutton from first dropdown, on next row i click for inline editing and dropdown dont have radiobutton option, in this case the data in prev row for dropdown(radiobutton) gets blank which i selected .
Any suggestions.
got a solution:
onSelectRow: function(id){
if(id && id!==lastsel2){
jQuery("#list").saveRow(lastsel2, false, 'clientArray');
jQuery("#list").setColProp("Display_Type", { editoptions: { value: GetDefaultValues(id)} });
jQuery('#list').editRow(id,true);
lastsel2=id;
}
},
used on selectrow to save the row first and then change the editoption.
精彩评论