struts2 jquery grid plugin: set width dynamically -


i'm using struts2 jquery grid pluggin

    <@sjg.grid     ...     id="mygrid"     shrinktofit="true"     resizable="true"     shrinktofit="true"     width= "1000"     ... 

this display table within division (i.e div="foo") on page. "foo" division fluid changes screen resolution. need dynamically update width of grid size of foo division. i.e.:

$(document).ready(function() {     var foo_width = $("#foo").width();     // dynamically update mygrid width foo_width } 

any idea? help

just found out there autowidth attribute in struts2-jquery plugin:

<@sjg.grid     ...     id="mygrid"     shrinktofit="true"     resizable="true"     shrinktofit="true"     width= "1000"     ...     autowidth="true" 

that autowidth attribute automatically sets width of grid 1 of parent element. documentation here http://code.google.com/p/struts2-jquery/wiki/gridtag


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -