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

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -