Tuesday 18 December 2012

RowNumber for JQgrid


In order to set  rowNumber for JQgrid

  • rownumbers is to be set as true
  • rownumWidth can be set for width  customization of the rowNumber field


By default this column gets added as left most field in grid .Thie following code snippet can be  modified to set the rowNumbers at certain position.
Slice method can be used to achieve it.
if(this.p.rownumbers)
{
this.p.colNames.unshift("");
this.p.colModel.unshit({name:'rn',width:ts.p.rownumWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
}

No comments:

Post a Comment