游戏人生看别样风景

首页 » 前端技术 » 正文

easyUI中datagrid加载(更新)数据及默认选中所有复选框

2017年01月10日 | 分类:前端技术 | 作者:huck | 评论:0条评论 | 浏览:823
toolbar:[{

       iconCls: 'icon-add',

    text:'确认选择',

    handler: function(){

     var rows = $("#addScore_tb").datagrid("getSelections");

     if(rows.length==0){

      $.messager.alert('提示','请选择要加分的学生');

     }else{

      $("#addScore_stusInfo").datagrid("loadData",rows);//将复选选中的数据rows加载到另一个datagrid中

      $("#addScore_stusInfo").datagrid("selectAll");//选中所有复选框
      

      $('#addScore_selectStudd').dialog("close");

     }

    }

      },'-',{

    iconCls: 'icon-edit',

    text:'返回',

    handler: function(){

     $('#addScore_selectStudd').dialog("close");

    }

   }]

$("#addScore_stusInfo").datagrid("loadData",rows); //将复选选中的数据rows加载到另一个datagrid中

$("#addScore_stusInfo").datagrid("selectAll"); //选中所有复选框


效果如下:


 

火狐截图_2017-01-10T01-41-05.830Z.png


火狐截图_2017-01-10T01-42-19.116Z.png


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

«   2024年3月   »
123
45678910
11121314151617
18192021222324
25262728293031
网站分类
标签列表
最近发表
最新留言
网站收藏
    RainbowSoft Studio Z-Blog订阅本站的 RSS 2.0 新闻聚合html5创意