0

我有一个带有用于搜索的文本框的网格。对于客户,我想添加一个下拉而不是文本框。有什么建议么?谢谢

        <table id="customer_list" class="scroll jqTable" cellpadding="0" cellspacing="0"></table>
        <!-- pager will hold our paginator -->
        <div id="customer_list_pager" class="scroll" style="text-align:center;"></div>
<script type="text/javascript">
        /* when the page has finished loading.. execute the follow */
        $(document).ready(function () {
            jQuery("#customer_list").jqGrid({
              url:'jq_customer_list',
              datatype: "json",
              colNames:['Customer','Application','Location','Product','id'],
              colModel:[
                {name:'Customer'},
                {name:'Application'},
                {name:'Location'},
                {name:'Product'},
                {name:'id', hidden:true}
              ],
              rowNum:1,
              rowList:[1,2,3,4],
              pager: jQuery('#customer_list_pager'),
              viewrecords: true,
              gridview: true
            });
            $("#customer_list").jqGrid('filterToolbar',{autosearch:true});
        });
        </script>
4

1 回答 1

0

只需添加

{name:'location',stype:'select', searchoptions:   {value:':All;USA:USA;Canada:Canada;Carribean:Carribean;USPacific:USPacific;'}},

你得到你的下拉菜单

于 2013-01-18T15:28:32.590 回答