EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: melane on June 23, 2013, 10:31:01 PM



Title: edatagrid disableEditing
Post by: melane on June 23, 2013, 10:31:01 PM
Hi,

In some cases I do not want to allow my datagrid to be editable, so I was calling the disableEditing method, but this does not work.
I am just doing this :
$('#dg').edatagrid('disableEditing');


What am I doing wrong?
How do I disable the edition on the entire grid ?

Thanks,

Melanie


Title: Re: edatagrid disableEditing
Post by: melane on June 23, 2013, 10:40:15 PM
Actually I figure this out, I need to call the disableEditing each time data is reloaded. So I called it in the on onLoadSuccess call back


 $('#dg').edatagrid({     
    columns:columns,
    url: 'myrl',
   onLoadSuccess : function(data){
   //check my data confition : for now always disable edition...
         $('#dg').edatagrid('disableEditing');
   }
});