EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: korenanzo on March 25, 2016, 08:36:15 AM



Title: datagrid cell edit
Post by: korenanzo on March 25, 2016, 08:36:15 AM
Hi,
I am using datagrid-celledit;

I need to cancel edit and get the value of the edited field.

I can't conclude the edit with endEdit, 'cause I don't want modify the record

Can I get the value of the in-edit field, before concluding  the edit status?

Thanks,

Rio


Title: Re: datagrid cell edit
Post by: jarry on March 25, 2016, 11:34:23 PM
Get the editor of the special cell and you will be able to retrieve the editing value.
Code:
var dg = $('#dg');
var cell = dg.datagrid('cell');
if (cell){
var ed = dg.datagrid('getEditor', cell);
if (ed){
var value = ed.actions.getValue(ed.target);
console.log(value)
}
}


Title: Re: datagrid cell edit
Post by: korenanzo on March 29, 2016, 01:17:43 AM
thanks!!