EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Opan Mustopah on December 13, 2014, 12:14:36 AM



Title: cannot get editor in datagrid
Post by: Opan Mustopah on December 13, 2014, 12:14:36 AM
hello again,

now i have a problem with get the editor on datagrid. when datagrid row  is empty, the result when i try to get the editor for specific field always null. here my code:
Code:
onBeforeEdit: function(rowIndex, rowData){
rowData.editing = true;
updateActions(rowIndex, $list_data);
loadLinkbutton(this);
state.op = "edit";
var editor = $(this).datagrid('getEditor',{index:rowIndex,field:'shipper_address_det'});
console.log(editor);  // ==> this value always null;
console.log(rowIndex);
//alert('op');

},


i already read the document. but i think i do what exactly document said. where is the problem in my code?

thanks for helping



Title: Re: cannot get editor in datagrid
Post by: jarry on December 13, 2014, 12:55:50 AM
You can not get any editors in the 'onBeforeEdit' event since the row does not go into edit mode.


Title: Re: cannot get editor in datagrid
Post by: Opan Mustopah on December 13, 2014, 01:06:36 AM
yeah my false, i should use onBeginEdit event, so editor was created and then i can get the editor :D

thanks jarry