In my jqgrid, I can resize all columns.
Initially when grid is rendered, then all the columns are shrink to fit and there is no empty space at the right edge.
When I resize any column then I always get horizontal scroll (when the column width is increased) or empty space (when column width is decreased). I want to fill this space everytime. i.e. my last column should do that. If any column increased then I would subtract that pixels from last column or if any column is decreased then I would increase that pixels from last column. The result will look like that there is never a horizontal scroll or empty space.
resizeStop: function(width, index) {
initialWidth = this.p.colModel[3].width; //***see below note about this line***
var finalWidth = Math.abs(initialWidth - width);
alert(finalWidth);
}
***this gets me default width at the time of initialisation. I need initial width i.e. before resizing. So that I can do maths with it.
Fiddle - http://jsfiddle.net/aUDHx/597/
Any help greatly appreciated.