EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jaimi on February 27, 2015, 03:32:02 AM



Title: datagrid reload
Post by: jaimi on February 27, 2015, 03:32:02 AM
I want to reload the whole site after insert oder update a row to a edatagrid.
How to?
THX, Jaimi


Title: Re: datagrid reload
Post by: jjosotoro on March 04, 2015, 07:59:17 AM
hello.

Use the onSave event to execute code after saving a record in edatagrid.

Code:
$('#MyEDatagrid').edatagrid({
  onSave:function(index,row){
    window.top.location.reload(); //reloads the entire page
  }
});

or you coudl just reload the edatagrid

Code:
$('#MyEDatagrid').edatagrid({
  onSave:function(index,row){
    $('#MyEDatagrid').edatagrid('reload');
  }
});


hope that helps