EasyUI Forum
December 18, 2025, 05:37:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: datagrid resize  (Read 19375 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: November 25, 2012, 04:12:47 PM »

I have one collapsible panel with one search form in it.
inside, there's one datagrid, that shows 10 records obtained from the search operation.
the idea is when panel collapse, the datagrid extend its size to show 30 records.
the problem is I can't get the datagrid resize operation.
my code is:
<table class="easyui-datagrid" id="logAgents" style="height:410px" data-options="pageSize:20,fitColumns:true,singleSelect:false,pagination:true,url:'....'">
then:
<div id="sub1" class="easyui-panel" style="width:auto;height:160px;padding:0px 0px 0px 0px;" data-options="collapsible:true,fit:true,iconCls:'icon-save',tools:'#tools',onCollapse:function(){$('#logAgents').datagrid('resize',600);}" title:'xx'>
thanks in advance for your support,
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 25, 2012, 11:32:09 PM »

The statement below is illegal.
$('#logAgents').datagrid('resize',600);

To resize the datagrid, the width or height property must be passed to the 'resize' method.
Code:
$('#logAgents').datagrid('resize',{
  width: 600
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!