jqgrid servlet demo

$(function (){

                $("#editschoolconcrncytable").jqGrid({

                    url:'WebServices/GetSchoolInfo.ashx?user='+user,

                    datatype: "xml",

                    colNames:['id', '使用单位名称','并发数','地区','用户名','密码'],

                    colModel:[

                        {name:'id',index:'id', width:75},

                        {name:'schoolname',index:'schoolname', width:75,editable: true},

                        {name:'concurrency',index:'concurrency',width:75,editable: true},

                        {name:'region',index:'region',width:75,editable: true},

                        {name:'username',index:'username',width:75,editable: true},

                        {name:'password',index:'password',width:75,editable: true,hidden:true,editrules:{edithidden:true}},

                                         ],

                    height:350,

                    rowNum:500,

                    autowidth: true,

                    sortname: 'id',

                    rowList:[50,100,500],

                    pager: $('#pager17'),

                    viewrecords: true,

                    caption:"使用单位设置",

                  

                    editurl:'WebServices/SchoolHandler.ashx?user='+user,

                    ondblClickRow: function(id){

                      

                    }

                }).navGrid('#pager17',{edit:true,add:true,del:true,search:false});

           });   

        </script>



就是加粗的那一样,hidde:true,隐藏列,editrules:{edithidden:true},可以编辑此隐藏列



另外固定列的宽度   fixed:true

你可能感兴趣的:(Web)