码迷,mamicode.com
首页 > 其他好文 > 详细

EasyUi Grid以POST方式传送参数绑定

时间:2015-10-20 15:12:35      阅读:290      评论:0      收藏:0      [点我收藏+]

标签:

function LoadList() {
            $("#TableContainer").datagrid({
                url: ‘/HM/M_Main/HC/DataPostControl.aspx‘,
                method: "post",
                title: ‘工资明细列表‘,
                loadMsg: ‘数据加载中,请稍候...‘,
                nowrap: false,
                pageSize: 50,
                pageList: [50, 150, 300],
                columns: column,
                fitColumns: true,
                singleSelect: true,
                pagination: true,
                width: "100%",
                toolbar: toolbar,
                sortOrder: "asc",
                onLoadSuccess: function (data) {
                    $.tool.MergeEasyUiGrid("TableContainer", "Name,SalaryYear,SalaryMonth");
                },
                onBeforeLoad: function (param) {
                    param = $.JQForm.GetParam("CSPerson", "GetSalaryDataList", "TableContainer", param);
                }
            });
        }

 

 

$.JQForm.GetParam = function (Class,Command,GridContainer, Param)

{    

var gridOpts = $(‘#‘ + GridContainer).datagrid(‘getPager‘).data("pagination").options;    

Param.Method = "DataPost";    

Param.Class = Class;    

Param.Command = Command;    

Param.page = gridOpts.pageNumber;    

Param.rows = gridOpts.pageSize;

$("input,select,textarea").each(function ()

{        

  var key = $(this).attr("id");

  if (key != "" && key != "__VIEWSTATE" && key != null) {            

    Param[key] = $(this).val();

            if ($(this).hasClass("easyui-datebox") == true)

    {                    

      $(this).datebox("getValue", obj[attr]);            

    }            

    if ($(this).hasClass("easyui-combotree") == true)

    {                    

      $(this).combotree("getValue", obj[attr]);            

    }        

  }    

});

    return Param; };

EasyUi Grid以POST方式传送参数绑定

标签:

原文地址:http://www.cnblogs.com/littlewrong/p/4894803.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!