Title: Datagrid fit 100% width and height with dynamic resizing Post by: doev on November 27, 2013, 04:47:15 AM Hi,
I like to have a datagrid/table perfectly fit its container. Width works so far, but it is not redrawn when I resize the browser. With height I have no idea. Can someone give my a hint? Title: Re: Datagrid fit 100% width and height with dynamic resizing Post by: varonica on November 28, 2013, 07:51:32 PM If i'm not mistaken, this would help you:
Code: var $element=$(window),lastWidth=$element.width(),lastHeight=$element.height(); Title: Re: Datagrid fit 100% width and height with dynamic resizing Post by: doev on November 29, 2013, 05:54:36 AM Thank you!
I add ... $('#dg').datagrid('resize'); $('#toolbar').panel('resize'); ... to my function that is called when the browser-window resizes and it works fine. But still have no solution for 100% height. Try to change the height with js, but no reaction. Title: Re: Datagrid fit 100% width and height with dynamic resizing Post by: varonica on November 29, 2013, 06:01:00 PM Can you post your code here ?
Title: Re: Datagrid fit 100% width and height with dynamic resizing Post by: arma on November 30, 2013, 06:48:03 PM You can put your grid in easyui layout to make it autoresize
Title: Re: Datagrid fit 100% width and height with dynamic resizing Post by: doev on December 04, 2013, 06:16:03 AM I still searching for an solution. Currently the datagrid has a fixed size of about 550px.
Here is my Code: Code: <body> Title: Re: Datagrid fit 100% width and height with dynamic resizing Post by: doev on December 05, 2013, 02:27:03 AM Ok, was my fault.
The table was not directly in the Layout, it was in a div inside the Layout. Now it works! Thx |