jqGrid中的水平滚动条 [英] Horizontal Scroll Bar in jqGrid

查看:81
本文介绍了jqGrid中的水平滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Project的两个地方都使用了jqGrid.

I am using jqGrid at two places in my Project .

在第一个示例代码中,它运行得很完美,并且出现了横杠……

In first sample code it is running perfect with horizontal bar showing up ...

第一个jqGrid的示例代码 示例代码:

Sample Code for first jqGrid Sample Code :

jQuery("#list2").jqGrid({
    url:'server1.php?P1=ACNO,APHID',
    datatype: "json",
    colNames:[
        'ACNO','APHID'
    ],
    colModel:[
        {name:'ACNO',index:'ACNO', width:80, sortable:true, search:true},
        {name:'APHID',index:'APHID', width:80, sortable:true, search:true}
    ],
    rowNum:100,
    rowList:[100,200,300,400],
    pager: '#pager2',
    loadonce: true,
    sortname: 'geneID',
    viewrecords: true,
    width:700,
    shrinkToFit:false,
    height:700,
    sortorder: "desc",
    caption:"Breeder Tool Box"
});

第二个jqGrid的示例代码 示例代码:

Sample Code for the second jqGrid Sample Code :

jQuery("#list2").jqGrid({
    url:'server4.php?P1=NEMATODE',
    datatype: "json",
    colNames:['Linkage_group','Chromosome','Start_Position','Stop_Position','Start','End','geneID','Feature_Type','Feature_Name','Mstart','Mstop','Trait'],
    colModel:[
        {index: 'Linkage_group', name: 'Linkage_group',width:170, sortable:true, search:true},
        {index: 'Chromosome', name: 'Chromosome',width:170, sortable:true, search:true},
        {index: 'Start_Position', name: 'StartPos',width:170, sortable:true, search:true},
        {index: 'Stop_Position', name: 'StopPos',width:170, sortable:true, search:true},
        {index: 'Start', name: 'Start',width:170, sortable:true, search:true},
        {index: 'End', name: 'End',width:170, sortable:true, search:true},
        {index: 'geneID', name: 'geneID',width:170, sortable:true, search:true,formatter: formatOperations},
        {index: 'Feature_Type', name: 'Feature_Type',width:170, sortable:true, search:true},
        {index: 'Feature_Name', name: 'Feature_Name',width:170, sortable:true, search:true},
        {index: 'Mstart', name: 'Mstart',width:170, sortable:true, search:true},
        {index: 'Mstop', name: 'Mstop',width:170, sortable:true, search:true},
        {index: 'Trait', name: 'Trait',width:170, sortable:true, search:true}],
    rowNum:100,
    rowList:[100,200,300,400],
    pager: '#pager2',
    loadonce: true,
    shrinkToFit:false,
    viewrecords: true,
    width:700,
    height:700,
    sortorder: "desc",
    caption: "Breeder Tool Box",
    sortname: 'Linkage_group'
});

第二个网格的

jqGrid全部失真,没有水平条. 我找不到这两个代码之间的区别, 你能指出我的错误在哪里吗?

jqGrid for the second grid is all distorted with no horizontal bar . I am not able to find the differences between these two codes , Can you please point where is my mistake ?

推荐答案

您可以使用CSS执行此操作.在ui.grid.css

you can do this with css. Change the following in ui.grid.css

.ui-jqgrid .ui-jqgrid-bdiv {
  position: relative; 
  margin: 0em; 
  padding:0; 
  /*overflow: auto;*/ 
  overflow-x:visible; 
  overflow-y:auto; 
  text-align:left;
}

这篇关于jqGrid中的水平滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆