EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Ellipsis on November 21, 2012, 08:20:34 AM



Title: Datagrid:: Ajax loader called multiple times
Post by: Ellipsis on November 21, 2012, 08:20:34 AM
I have a datagrid function with a loader: jQuery.ajax......
The datagrid is only build in javascript, no HTML classes invoking easyui to build the grid.

The function to generate the datagrid is called a single time, but the ajax call fires three times......

Code:
// Function only called once....

function generateGrid(){

jQuery(idObject.id_overview_table).datagrid({
   sortName: 'examinationDate',
   idField: 'sourcedId',
   textField: 'label',
   pagination: true,
   fitColumns: true,
   striped: true,
   rowNumbers: true,
   pageSize: 10,
   pageList: [50,100,250,1000],
   toolbar: '#pfx_toolbarOverviewGrid',
            loader: function(param,success,error){
       jQuery.ajax({
url: 'ajax?action=getOverviewInoe',
                                type: 'GET',
success: function(data,textStatus, jqXHR){
success(data);
}
});
   }

}


Where can I look, I just can't see the cause.


Title: Re: Datagrid:: Ajax loader called multiple times
Post by: acreonte82 on March 04, 2014, 12:13:34 PM
I've noticed the same problems also for the last version of jeasyui...

Why ajaax loader call 3 times the file to generate the datagrid?
how can we stop this?


Title: Re: Datagrid:: Ajax loader called multiple times
Post by: stworthy on March 04, 2014, 03:27:32 PM
Please show the <table> markup you are using. If the markup has class="easyui-datagrid" attribute, please remove it.


Title: Re: Datagrid:: Ajax loader called multiple times
Post by: acreonte82 on March 05, 2014, 03:30:53 PM
Ok I deleted it,  but now easyui call 2 time the same files to load the datagrid..



Title: Re: Datagrid:: Ajax loader called multiple times
Post by: stworthy on March 05, 2014, 07:47:23 PM
Please refer to the attached file 'test.zip'. It only runs once.