• ParamQueryGrid绑定数据


    表格工具:https://paramquery.com/pro

    <!---------------------------------------PQGrid引用----------------------------------------------->
    <link href="../../scripts/pqgrid/pqgrid.min.css" rel="stylesheet" />
    <link href="../../scripts/pqgrid/pqgrid.ui.min.css" rel="stylesheet" />
    <link href="../../scripts/pqgrid/jquery-ui.min.css" rel="stylesheet" />
    <link href="../../scripts/pqgrid/themes/bootstrap/pqgrid.css" rel="stylesheet" />
    <script src="../../scripts/pqgrid/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../../scripts/pqgrid/pqgrid.min.js" type="text/javascript"></script>
    <!--------------------------------------PQGrid引用------------------------------------------------>

    function DataPQGrid(){

    //var data = "[{'id':1,'code':'B001','color':'红色','pic':'','unit':'米','inventory':1,'status':0,'brand':'波司登','manufacturer':'波士顿','contact':'理','contactTel':'133','exp1':0,'exp2':12.00,'exp3':'','exp4':'','exp5':'','factoryid':1}]";
    // var data=eval("(" + json + ")");
    var obj = {
    scrollModel: { autoFit: true },
    numberCell: {show: false},
    title: "面料明细",
    selectionModel: { type: null },
    pasteModel: { on: false },
    sortModel: {on : false},
    height: 'flex',
    "80%",
    // pageModel: { type: "local", rPP: 10 },
    colModel:
    [
    { title: "主键", 100, dataType: "integer", dataIndx: "id" ,hidden:true},
    { title: "面料编号", 100, dataType: "integer", dataIndx: "code" ,editor: false},
    { title: "颜色", 100, dataType: "string", dataIndx: "color",editor: false },
    { title: "品牌", 100, dataType: "float", align: "center", dataIndx: "brand",editor: false },
    { title: "库存", 100, dataType: "float", align: "center", dataIndx: "inventory",editor: false },
    { title: "消耗", 100, dataType: "float", align: "center", dataIndx: "fabricxh" },
    { title: "单位", 100, dataType: "float", align: "center", dataIndx: "unit",editor: false }
    ],
    dataModel: {
    // data:data
    location: "remote",
    type: 'post',
    dataType: "text",
    url: "HandlerAjax.ashx?action=get_fabric_json&factoryid="+$("#hidFactory").val()+"&stylecode="+$("#txtStyleCode").val(),
    getData: function (dataJSON) {
    var data = eval("(" + dataJSON + ")");
    return {data: data };
    }
    },
    selectChange: function (evt, ui) {
    console.log('selectChange', ui);
    var address = ui.selection.address();
    $("#select_change_div").html(JSON.stringify(address));
    }
    };
    $("#gridf_json").pqGrid(obj);
    $("#gridf_json").pqGrid("refreshDataAndView");

    }

    这些都是博主多年积累的,有些可能是别人的,但博主已经不记得来自哪里了,就不特殊标出了,望见谅!!!!
  • 相关阅读:
    Shipconstructor 2005 破解发布
    活动目录(activate directory)
    上海地铁快成了乞丐天堂
    转载:制造业信息化:计划模拟APS软件驱动敏捷制造
    项目管理的测试版发布
    Introdution RemObject SDK
    怎样在osworkflow中使用BeanShell
    Java class 文件反编译工具 FrontEnd 2.0
    Tribon M3 license keygen
    利用osworkflow实现业务流程
  • 原文地址:https://www.cnblogs.com/objectxhy/p/6742934.html
Copyright © 2020-2023  润新知