jqgrid rowlist下拉列表丢失

时间:2012-08-04 17:38:37

标签: jqgrid

缺少jqgrid rowlist下拉列表。

Missing jqgrid rolwist dropdown http://www.managementlevelreview.com/images/MissingRowlist.jpg

我的代码:

jQuery("#gridsavedAfterHours").jqGrid({
    url:'/AfterHours/GetsavedAfterHours?userid=${thisuserid}&&orgcode=${thisorgcode}',
    datatype: 'json',
    colNames:['ID','Name','Branch','Start','End'],
    colModel:[
        {name:'AfterHoursId', index:'AfterHoursId', width:25, sortable:true, search:false, key: true},
        {name:'UserFullName', index:'UserFullName', width:150, sortable:true, search:false},
        {name:'UserOrgLongName', index:'UserOrgLongName', width:150, sortable:true, search:false},
        {name:'enteredStartDate', index:'enteredStartDate', width:100, sortable:true, search:false},
        {name:'enteredEndDate', index:'enteredEndDate', width:100, sortable:true, search:false}
    ],
    rowNum:${DefaultRowNumber ?? 10},
    rowList:[10,25,50,100],
    pager: jQuery('#savedAfterHoursPager'),
    onSelectRow: function(id){},
    sortname: 'Start',
    viewrecords: true,
    sortorder: 'desc',
    multiselect: false,
    imgpath: '/Content/images',
    caption: 'After Hours',
    height: 'auto',
    width: '800px',
    emptyrecords: 'No After Hours data found.'
}).navGrid('#savedAfterHoursPager',
    {edit:false,add:false,del:false},
    {}, // use default settings for edit
    {}, // use default settings for add
    {}, // delete instead that del:false we need this
    {   //search options
    closeOnEscape:true /* allow the view dialog to be closed when user press ESC key*/
    }
);

1 个答案:

答案 0 :(得分:1)

我认为您为input字段定义了一些CSS样式,该字段具有较大的width属性,可能还有其他一些属性。我建议您在页面上添加以下附加CSS

input.ui-pg-input { width: auto; }

在近距离主题上另见another answer