EasyUI Forum
September 19, 2025, 10:56:55 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: Ignore a Single Datagrid Column Height During Resize  (Read 8266 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: February 29, 2016, 03:11:48 AM »

I've tried to play with the CSS to achieve this but I cannot, and not really sure how to about this using JS.

I have a datagrid with cells that contains lists (UL/LI) and one of the columns (in the frozen columns) has up to 10 times more items than any other column in the unfrozen columns.

I would like to ignore a specific column when doing a resize, such that this column has it's overflow property set to scroll and the row is resized to match the next tallest cell.

Can this be done ?

Many thanks

Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 29, 2016, 08:31:49 PM »

You can try to use the 'formatter' function to limit the max height on a specified column.
Code:
formatter: function(value){
  return '<div style="max-height:60px;overflow:auto">'+value+'</div>'
}
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 on: February 29, 2016, 08:33:22 PM »

OOh, that's a good idea, I will try that
Logged

-- Licensed User --
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #3 on: March 02, 2016, 04:24:11 AM »

Is there an event that fires once all of the rows have completed rendering, with a large table document.ready does not catch it ??

There is a resize() method, is there an event available from this once it is completed ?

I need to set a column's max-height after all of the rows have been rendered, if I try and do in onLoadSuccess() then all of the rows are set to their nominal size 25px. Even with a 250ms delay the rows are still not rendered, but this is a very large datagrid that is populated via JSON and the only reliable method would be some eventh that fies once the resize() has completed.

I have also tried on resize(), but that only fires on panel resize, not on datagrid resize (do layout, size)

Code:
      $.each($('ul.ulbar.unp'),function(){
        var row = $(this).closest('tr.datagrid-row');
        $(this).css('max-height',row.height());
      })
Logged

-- Licensed User --
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!