EasyUI Forum
September 16, 2025, 04:04:06 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Can I make the grid have dynamic height depending on the number of records in it  (Read 9035 times)
bakerchen
Newbie
*
Posts: 9


View Profile Email
« on: April 22, 2013, 08:13:41 AM »

there is a empty column(should be preserved for scrollbar) if I set fit=true in a datagrid, it looks very weired.
Can I make the grid have dynamic height depending on the number of records in it, instead of a fixed height?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 22, 2013, 09:13:07 PM »

Try setting fit to false and height to auto.
Code:
$('#dg').datagrid({
width:600,
height:'auto',
fit:false
});
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!