zoukankan      html  css  js  c++  java
  • EasyUI EasyUI combogrid 组合框使用

    1.开启分页、 两个组合框级联、选中赋值等功能

        <select class="easyui-combogrid" id="clientls" style="200px" data-options="
                        panelWidth: 500,
                        idField: 'ID',
                        textField: 'ClientCode',
                        url: 'GetSelectClientList',
                        method: 'get',
                        pagination : true,
                        rownumbers:true,
                        collapsible:false,
                        pageSize: 10,
                        pageList: [10],
                        columns: [[
                            {field:'ID',title:'ID',80},
                            {field:'Stype',title:'账套',80},
                            {field:'ClientCode',title:'客户编号',80,align:'right'},
                            {field:'ClientName',title:'客户名称',80,align:'left'}
                        ]],
                        fitColumns: true,
                        onSelect : function(rowIndex, rowData) {$('#Stype').textbox('setValue', rowData.Stype);$('#ClientCode').combogrid('grid').datagrid('options').queryParams.filter = $('#clientls').textbox('getText');$('#ClientCode').combogrid('grid').datagrid('reload');},
                        labelPosition: 'top'"></select>
    
    
    
                            <select class="easyui-combogrid" id="ClientCode" style="200px" data-options="
                        panelWidth: 800,
                        idField: 'ID',
                        textField: 'SendAddress',
                        url: 'GetSelectClientList' ,
                        method: 'get',
                        pagination : true,
                        rownumbers:true,
                        collapsible:false,
                        pageSize: 10,
                        pageList: [10],
                        columns: [[
                            {field:'ID',title:'ID',50},
                            {field:'Stype',title:'账套',30},
                            {field:'ClientCode',title:'客户编号',80,align:'left'},
                            {field:'SendAddress',title:'送货地址',350,align:'left'},
                            {field:'SendName',title:'送货抬头',250,align:'left'},
                            {field:'SendNameSub',title:'送货子抬头',250,align:'left'},
                            {field:'InvoiceName',title:'发票抬头',80,align:'left'}
                           ]],
                        onSelect : function(rowIndex, rowData) {$('#Stype').textbox('setValue', rowData.Stype);$('#clientls').textbox('setValue', rowData.ClientCode);$('#SendName').textbox('setValue', rowData.SendName);$('#SendNameSub').textbox('setValue', rowData.SendNameSub);$('#InvoiceName').textbox('setValue', rowData.InvoiceName);},
                        labelPosition: 'top'"></select> 


    //设置筛选条件。可用于上下级联动。

    $('#ClientCode').combogrid('grid').datagrid('options').queryParams.filter = $('#clientls').textbox('getText');$('#ClientCode').combogrid('grid').datagrid('reload')

    onSelect事件设置选中后赋值、  级联动。注意调用api 最好返回string 格式json

    风雨之后见彩虹
  • 相关阅读:
    第一次热身赛和正式比赛感想
    简明解释算法中的大O符号
    poj 3045
    poj 3104
    poj 3273
    poj 3258
    poj 2456
    二分法小结
    Poj 2718 Smallest Difference
    GCJ——Crazy Rows (2009 Round 2 A)
  • 原文地址:https://www.cnblogs.com/kingvi/p/11217861.html
Copyright © 2011-2022 走看看