EasyUI Forum
May 05, 2024, 12:25:18 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: 'onLoadSuccess' function of the datagrid  (Read 19641 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: November 22, 2013, 11:57:42 PM »

Why is there no alert box pop up after the table being populated?Huh?

<table id="newcases"  class="easyui-datagrid" style="width:350px;height:270px" 
            url="load_data.php"   pagination="false" idField="ym" 
            rownumbers="false" fitColumns="true" singleSelect="true" showFooter="true"
            onLoadSuccess:function(data){alert("load ok");}
            onLoadError:function() {alert("load fail");} > 
            <thead> 
            <tr> 
               <th field="ym" width="25%" >Month</th> 
               <th field="newc" width="25%" align='right'>Brand New</th>
               <th field="evanc" width="25%" align='right'>From Old</th>
               <th field="ttl" width="25%" align='right'>Total</th>
               
            </tr>   
            </thead> 
         </table> 
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 23, 2013, 08:45:38 PM »

The events must be declared in 'data-options' attribute.
Code:
<table id="newcases"  class="easyui-datagrid" data-options="
      onLoadSuccess:function(){alert('load ok')}
    ">
</table>
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!