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.
|