EasyUI Forum
September 14, 2025, 07:28:59 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 autoRowHeight not working?  (Read 13295 times)
evaj
Newbie
*
Posts: 13


View Profile Email
« on: June 11, 2013, 05:24:38 AM »

Hi, I am trying to create a datagrid table dynamically from javascript:

HTML Code:
Code:
<table id="ordersGrid"></table>

JAVA SCRIPT Code:
Code:
$("#" + FIELD_WEB_UI_GRID).datagrid({
columns: gridColumns,
frozenColumns: frozenCols,
singleSelect:true,
onRowContextMenu: launchRightCLickMenu,
onClickRow: onClickEntry,
toolbar: '#tablesToolbarEntries',
onAfterEdit:onEditClosed,
autoRowHeight: false,
                height: 300,
                width: 500
});

It works fine but I want the table to have a fixed height, always 300, despite the number of elements it contains.
Whenever I call 'appendRow' method, the row is created but it makes the table to grow down.
I thought "autoRowHeight: false" would change that behaviour but I can't find any difference after dissabling auto row height.

Thank you for your help.
« Last Edit: June 11, 2013, 08:41:29 AM by evaj » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 11, 2013, 08:05:32 AM »

As the code you provided, the datagrid has fixed height(300px). Since the 'autoRowHeight' has been set to false, each row in datagrid has fixed height(25px).
Logged
evaj
Newbie
*
Posts: 13


View Profile Email
« Reply #2 on: June 11, 2013, 08:42:21 AM »

As the code you provided, the datagrid has fixed height(300px). Since the 'autoRowHeight' has been set to false, each row in datagrid has fixed height(25px).

Thank you for your answer,
I made a mistake, I meant fixed height of 300px and not 500px. Nonetheless, it doesn't matter. The point is that I don't want the table to grow after each insertion. I would like to get something similar to the examples, that is: If more rows are inserted, the table should keep its size and new rows should be visible by vertical scrolling, keeping the table header always visible.
Logged
evaj
Newbie
*
Posts: 13


View Profile Email
« Reply #3 on: June 12, 2013, 02:01:45 AM »

It seems it was a BUG at version 1.3. Once I switched to 1.3.2 it worked fine.

Thank you!
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!