jqgrid column resize after manually width change -



jqgrid column resize after manually width change -

i have function manually set width of jqgrid column. if after want utilize resize handle, adds or substracts relative original width size. doesn't see new width take base. have tried putting width , withorg in colmodel without success.

i have click handler inwhich resize column width on click. set width of th trought js. after able utilize .ui-jqgrid-resize element resizing column.

a short version of code, th 200px wide:

$('th').dblclick(function(){ $(this).width('100px'); });

after user doubleclicked, , th went smaller in size 100px, user uses resize handle widen th 10px. expected result th of 110px wide, thjumps 210px wide. adds 10px user wanted add together original state, not state have set doubleclick.

i recommend utilize setcolwidth method, plugin wrote before (see the answer), alter width of grid column. can download current version of plugin github.

if trying set width of columns based on width of content of column recommend take @ the demo created the answer , read the answer too. don't see suggested code final solution, demos shows view on problem , ways implement "autowidth" functionality.

jqgrid

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -