Hi all,
Since version 3.5 I have some problems with the widths of columns. By default the columns are as wide as the strings in the row. Thus the width of the column differs each row. When I resize one of the columns the problem disappears. Exactly the same script and html did work with 3.4. Can anyone help me to prevent this, or is this a bug?
The js-script i used is shown below, and the result can be seen here.
jQuery(document).ready(function(){
var lastsel;
jQuery(”#jQueryGrid1″).jqGrid({
colModel :[
{
sortable:false,
name:'jQueryGrid1Colum2' }
],
rowNum:'20',
datatype:'local',
caption: 'jQueryGrid1'
});
var jQueryGrid1Data=[
{id:”0″,jQueryGrid1Colum2:”test1″},
{id:”1″,jQueryGrid1Colum2:”test 2″}
];
for(var i=0;i<=jQueryGrid1Data.length;i++)
jQuery('#jQueryGrid1').addRowData((jQueryGrid1Data||{id:i++})['id'],jQueryGrid1Data);
$(window).unload( function () { jQuery('#jQueryGrid1').saveRow(lastsel); } );
});
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top