EasyUI Forum
May 16, 2024, 01:15:45 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid:: Ajax loader called multiple times  (Read 20801 times)
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« 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.
« Last Edit: November 21, 2012, 08:41:00 AM by reno1979 » Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #1 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?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 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.
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #3 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..

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 on: March 05, 2014, 07:47:23 PM »

Please refer to the attached file 'test.zip'. It only runs once.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!