zoukankan      html  css  js  c++  java
  • 处理Easyui的Datagrid无法及时刷新问题

    在Easyui中打打开窗口dialog控件,当做完修改操作之后,关闭dialog控件刷新Datagrid,有时候无法及时刷新。

    1、JavaScript中的代码

    [javascript] view plaincopy
     
    1. function doEdit(){                  
    2.         var timeText=$('#type2').combobox('getText');  
    3.         var timeValue=$('#type2').combobox('getValue');  
    4.         if(timeText==timeValue){  
    5.             timeText="";  
    6.             timeValue="";  
    7.         }  
    8.         $.messager.defaults={ok:"确定",cancel:"取消"};   
    9.         $.messager.confirm('Confirm', '您确定修改?', function(r){  
    10.             if (r){  
    11.                 $.ajax({  
    12.                        type: "POST",  
    13.                        url: "load!editDowntable.action",  
    14.                        data:"edit_id="+ $('#id2').val()+"&edit_title="+$('#title2').val()+"&edit_persontype="+timeValue+"&edit_cpersontype="+timeText+"&edit_loadtime="+$('#time2').datetimebox('getValue')  
    15.                                      
    16.                 });  
    17.                   }          
    18.             $('#editDlg').dialog('close');  
    19.             $('#tt').datagrid({  
    20.                 url:"load!queryTable.action"  
    21.   
    22.             });  
    23.               
    24.         });  
    25.           
    26.           
    27.     }<pre name="code" class="javascript"></pre><br>  


    2、html中的代码

    [html] view plaincopy
     
      1.    <table id="tt">          
      2.      <thead>  
      3.         <th data-options="field:'title',title:'标题',140"></th>  
      4.         <th data-options="field:'cpersontype',title:'类型',120"></th>  
      5.         <th data-options="field:'loadtime',title:'创建时间',120,formatter:formattime"></th>  
      6.     </thead>      
  • 相关阅读:
    Delphi程序设计之惯用法
    有关ADO专题
    钓子程序代源
    delphi函数大集合
    2012暑期川西旅游之第四天(丹巴甲居藏寨小金达维日隆)
    主流F2.8标准变焦镜头信息
    2012暑期川西旅游之第一天(成都海螺沟)
    2012暑期川西旅游之第五天(四姑娘山之双桥沟)
    宾得最小饼干DA 40mm F2.8 Limited[转]
    主流F2.8标准变焦镜头信息
  • 原文地址:https://www.cnblogs.com/henuyuxiang/p/4283017.html
Copyright © 2011-2022 走看看