EasyUI Forum
May 05, 2024, 10:00:15 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: problem when calling the treegrid constructor  (Read 11472 times)
A-K
Full Member
***
Posts: 122


View Profile WWW
« on: December 08, 2014, 03:43:55 AM »

Hey,
I have a problem calling the constructor of the treegrid like this code:

Code:
$('#tg').treegrid({
        autoRowHeight: false,
        nowrap: false
    });

Instead of just expanding all my rows that their content is bigger then the width it will
restore all the columns width to their initialized width. and only when ill resize the columns width again
it will take effect.

Image of columns width to small for the content:


After calling the code above it will restore my columns width.. instead of just expanding it:


The same code in the datagrid does not restore the columns width and works perfectly.
Any fix for this?

Thanks!
« Last Edit: December 08, 2014, 03:54:34 AM by A-K » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 08, 2014, 07:59:02 AM »

Please refer to this example http://jsfiddle.net/9kfg5y02/
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #2 on: December 08, 2014, 08:12:38 AM »

I am sorry but it does not fix the problem. in the example, you gave a width of 60 to the column 'size'
but if I change the width to 150 like in this example: http://jsfiddle.net/9kfg5y02/1/
you can see it doesnt work well..

I need to let my users an option that at any given time they can active this feature after playing with the columns size.
I cannot start my treegrid when the column width is already smaller then the content..

This example of the same case in the datagrid works just fine: http://jsfiddle.net/9kfg5y02/2/

Any other way to fix this?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: December 08, 2014, 09:06:33 AM »

Although we run this example on safari,chrome,ie,..., but it works well and does not occur the appearance you pointed.
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #4 on: December 08, 2014, 09:14:51 AM »

I am using the latest chrome Version 39.0.2171.71 m.

In your tests when you run this example http://jsfiddle.net/9kfg5y02/1/
if you change the size of the column at run time until the width of the column is smaller then the content
and then you press the "Recreate" button the width of the column isnt restored to its default size for you?

I have tested this also in firefox and its the same behavior, and in the datagrid it works great.

Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #5 on: December 08, 2014, 10:14:45 AM »

I also uploaded a video to youtube where I show the problem in the treegrid.

https://www.youtube.com/watch?v=cq-850GiX8s

0-8 second of the video show the behavior in the treegrid.

the rest of the video shows the behavior in the datagrid which works correctly.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 on: December 08, 2014, 07:17:14 PM »

Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.1-patch.zip.
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #7 on: December 08, 2014, 11:10:58 PM »

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