html - jqgrid fluid last column to fit -


in jqgrid, can resize columns.

initially when grid rendered, columns shrink fit , there no empty space @ right edge.

when resize column horizontal scroll (when column width increased) or empty space (when column width decreased). want fill space everytime. i.e. last column should that. if column increased subtract pixels last column or if column decreased increase pixels last column. result there never horizontal scroll or empty space.

resizestop: function(width, index) {      initialwidth = this.p.colmodel[3].width; //***see below note line***     var finalwidth = math.abs(initialwidth - width);     alert(finalwidth); } 

***this gets me default width @ time of initialisation. need initial width i.e. before resizing. can maths it.

fiddle - http://jsfiddle.net/audhx/597/

any appreciated.

you need call setgridwidth inside of resizestop suggested in the answer. should try code updated part of answer if use 1 latest version of jqgrid. in case if code not need should describe test case , i'll wite how can fix problem.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -