EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
September 16, 2025, 03:53:34 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
on resize, resize all children
Pages: [
1
]
« previous
next »
Print
Author
Topic: on resize, resize all children (Read 17112 times)
devnull
Sr. Member
Posts: 431
on resize, resize all children
«
on:
March 06, 2013, 09:49:29 PM »
Is it possible to globally run the resize() method on all easyui-object children when the containing panel is resized ??
Code:
$('#center').panel({
onResize:function(){
//$(this).easyui.resize
}
});
Logged
-- Licensed User --
stworthy
Administrator
Hero Member
Posts: 3581
Re: on resize, resize all children
«
Reply #1 on:
March 06, 2013, 11:28:52 PM »
Set the 'fit' property to true for a component and it will be automatically resized when its container panel is resized.
Logged
devnull
Sr. Member
Posts: 431
Re: on resize, resize all children
«
Reply #2 on:
March 07, 2013, 05:31:36 AM »
Thanks;
fit=true is already set on the datagrid in the main panel, but when the left hand menu panel is collapsed or resized, the datagrid does not re-size to the new full width of the main panel.
Logged
-- Licensed User --
stworthy
Administrator
Hero Member
Posts: 3581
Re: on resize, resize all children
«
Reply #3 on:
March 07, 2013, 08:08:31 AM »
Please refer to this sample
http://www.jeasyui.com/demo/main/index.php?plugin=Layout&theme=default&dir=ltr&pitem=Basic
. When the left panel is collapsed or resized, the datagrid is automatically resized to full fill its container space.
Logged
devnull
Sr. Member
Posts: 431
Re: on resize, resize all children
«
Reply #4 on:
March 08, 2013, 01:02:52 AM »
Thanks, it only appears to work when the datagrid is the first element in the container.
Take a look at this:
http://jsfiddle.net/Chqxu/1/
Thanks
Logged
-- Licensed User --
stworthy
Administrator
Hero Member
Posts: 3581
Re: on resize, resize all children
«
Reply #5 on:
March 08, 2013, 02:51:56 AM »
Here is the updated example that solved your issue.
http://jsfiddle.net/Chqxu/2/
Logged
devnull
Sr. Member
Posts: 431
Re: on resize, resize all children
«
Reply #6 on:
March 08, 2013, 04:06:21 AM »
Thanks so much for helping, unfortunately that only works if the datagrid is the first element in the form, but in most cases it is not there are other elements above it.
See updated fillde:
http://jsfiddle.net/Chqxu/7/
«
Last Edit: March 08, 2013, 06:13:40 PM by devnull
»
Logged
-- Licensed User --
stworthy
Administrator
Hero Member
Posts: 3581
Re: on resize, resize all children
«
Reply #7 on:
March 09, 2013, 07:15:36 AM »
Here is the updated example
http://jsfiddle.net/Chqxu/10/
that using nested layout to solve your issue.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...