EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jaimi on January 21, 2015, 03:28:38 AM



Title: data grid dubble load behavior
Post by: jaimi on January 21, 2015, 03:28:38 AM
HI, I noticed a strange behavior during loading the datagrid.
I created a data grid like this:
...
 ]] ,//columns
  toolbar     : '#tobPferd',
  url         : 'pferd.act.php?frm=frmHOM&act=T&sel=' + vSEL,
  //saveUrl     : 'pferd.act.php?frm=HOM&act=I',
  //updateUrl   : 'pferd.act.php?frm=HOM&act=U',
  //destroyUrl  : 'pferd.act.php?frm=HOM&act=D',
  remoteSort  : 'true',
  idField     : 'OLT30A001T_KEY',
  queryParams : {sort: 'HOM_NAME'},
  //rownumbers  : 'false',
  singleSelect: 'true',
...
 ,onLoadSuccess: function(objects){
     //alert('onLoadSuccess');
     var total = objects.total;
     if (total > 0){alert('tomatch');}
  }
 });//edatagrid

the onLoadSuccess shows the alerts two times.
Is this behavior normal? What is wrong? can anyone give me a clue?

THX. Jaimi


Title: Re: data grid dubble load behavior
Post by: jarry on January 21, 2015, 07:19:13 AM
Please refer to this topic  http://www.jeasyui.com/forum/index.php?topic=416.0


Title: Re: data grid dubble load behavior
Post by: jaimi on January 27, 2015, 11:33:58 PM
Thank you. BUT: I don't use class. My definition of the edatagrid is:

  $form = '<script type="text/javascript" src="pferd.eui.hom.js"></script>';
 
  $form .= '<table id="edgPferd"></table>';
  $form .= '<div id="tobPferd" style="padding:5px;height:auto">';
  $form .= '<input id="sHOM_NAME" style="width:200px;">';
  $form .= '<input id="sHOM_UELN" style="width:180px;">';
  $form .= '<input id="sZUG_AREA" style="width:180px;">';
  $form .= '<input id="sGEN_NAME" style="width:180px;">';
  $form .= '<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="searchPferd()" style="margin:0px 0px 0px 5px;">Suche</a>';
  $form .= '</div>';
  $form .= "<input type=hidden id=vSEL value=$sel>";
  $form .= "<input type=hidden id=vPRV value=$prv>";
  $form .= '<input type=hidden id="vSITE" value="' . $site . '">';
  return $form;

Any other reason?