开发者

jqGrid header width different from data column width

开发者 https://www.devze.com 2023-01-18 06:06 出处:网络
I\'ve implemented jqGrid with treeGrid enabled. On Firefox, the width off the header row (with the titles of the columns) is different from the width off the data rows.

I've implemented jqGrid with treeGrid enabled. On Firefox, the width off the header row (with the titles of the columns) is different from the width off the data rows. I've attached the init code for the jqGrid and a link with the screenshot image off the problem (because I'm new to the site, it appears I can't upload the image)

jQuery("#treegrid").jqGrid({
   treeGrid: true,
   treeGridModel: 'nested',
   ExpandColumn : 'customer',
   url: 'index.php?page=902&uid=' + uid + '&forecast_pageno=' + pageno,
   datatype: "json",
   mtype: "POST",
      colNames:["Id","Type","Customer","Year","%" , "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Total", "Status"],
      colModel:[
         {name:'id',index:'id',hidden:true},
         {name:'type',index:'type',hidden:true},
         {name:'customer',index:'customer', width:225, align:"left", sortable:false, fixed:true},
         {name:'year', index:'year', width:45, sortable:false, align:"right"},
     {
             name:'market_increase',
             index:'market_increase',
             width:30,
             editable:true, editrules:{number:true},
             formatter:marketIncreaseFormatter,
             unformat:marketIncreaseUFormatter, sortable:false, align:"right"
         },
         {name:'jan', index:'jan', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'feb', index:'feb', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'mar', index:'mar', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'apr', index:'apr', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'may', index:'may', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'jun', index:'jun', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'jul', index:'jul', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'aug', index:'aug', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'sep', index:'sep', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'oct', index:'oct', width:60, editable:true, editrules:{number:true}, sortable:false, al开发者_StackOverflow中文版ign:"right"},
         {name:'nov', index:'nov', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'dec', index:'dec', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'total', index:'total', width:60, sortable:false, align:"right"},
         {name:'status', index:'status', hidden:true}

      ],
   height:'auto',
   cellEdit: true,
   rowNum: -1});

Screenshot Image

Thanks, Gabriel


Okey, there seems I was using a different css file for the jqGrid, from an older release. An update of the css solved the problem. Thanks, Gabriel

0

精彩评论

暂无评论...
验证码 换一张
取 消