Title: Is it possible to change editor for column when row is in edit mode Post by: glarsen on April 09, 2018, 07:07:44 AM I would like to change the editor of a datagrid column when another column in the row changes using a combobox.
This line runs: col.editor = checkBoxEditor and it changes the editor of the object (see attached) but does not update the datagrid. {field:'licenseType', title:'License', fixed: true, width: 120, formatter:function(value,row){ return row.licenseType; }, editor:{ type:'combobox', options:{ limitToList: true, valueField:'licenseType', textField:'label', method:'get', mode:'local', data: [{ label: 'Administrator', licenseType: 'Administrator' },{ label: 'Analyst', licenseType: 'Analyst' },{ label: 'Author', licenseType: 'Author' },{ label: 'Consumer', licenseType: 'Consumer' }], required:true, onChange:function(newValue, oldValue) { if (oldValue != '') { var col = $('#userGrid').datagrid('getColumnOption', 'modelItem'); if (newValue == 'Analyst') { col.editor = checkBoxEditor; } else { col.editor = null; } } } } } }, Thanks for any assistance. Title: Re: Is it possible to change editor for column when row is in edit mode Post by: stworthy on April 09, 2018, 07:32:25 PM To change the editor, please reset the 'editor' property and call 'beginEdit' method to edit the row again. Please try this code.
Code: $('#dg').datagrid({ |