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


    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,
                    "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; };

  • 相关阅读:
    SQL Server创建索引的技巧分析
    SQL Server创建索引
    kmp算法的应用
    相交环的面积
    Rebranding
    Olympiad
    找新朋友
    卡特兰数
    越狱
    Wolf and Rabbit
  • 原文地址:https://www.cnblogs.com/littlewrong/p/4894803.html
Copyright © 2020-2023  润新知