EasyUI Forum
May 15, 2024, 10:29:32 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: onResizeColumn problem.  (Read 14898 times)
A-K
Full Member
***
Posts: 122


View Profile WWW
« on: August 03, 2015, 06:43:47 AM »

Hey,

My columns in datagrid are in precentage, the problem was that when the user was resizing them
EasyUI will remove the precentage and make the column in pixels which makes the datagrid not responsive and its a problem..

I pointed this problem and was answerd here: http://www.jeasyui.com/forum/index.php?topic=4434.msg10707#msg10707
the solution uses the onResizeColumn event to calculate the pixels into precentage.

But now when I am using it I noticed that double clicking on a column header to make it resize to the minimum width does not work.

Here is an example: http://jsfiddle.net/3L4ej4dx/59/
Try double clicking on the resize in column header to make it resize to its minimum content width, it doesnt work.

Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 03, 2015, 07:32:26 AM »

Please try this updated example http://jsfiddle.net/3L4ej4dx/61/
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #2 on: August 03, 2015, 07:47:12 AM »

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


View Profile WWW
« Reply #3 on: August 05, 2015, 02:36:18 AM »

After I added the filters extension and played with the resize, the table got broken.
The borders are not aligned correctly.

Updated example:http://jsfiddle.net/3L4ej4dx/67/

Try to double click the header columns and resize them and at some point it will brake.


Also, I added console.log(width) to the event and noticed that when double clicking
the column header for resize it will return a width and after I resize it to bigger size
the width will be less then before, which is not possible. I tested this on 1.4.2 and it worked fine there.

Double clicking on column header got width 75:


I then made it a bit bigger and got width 74:


Any patch for this?

Thanks!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 on: August 05, 2015, 06:28:58 AM »

According to your operating steps, we can not reproduce the appearance you pointed. The result shows as the attached picture.
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #5 on: August 05, 2015, 07:18:27 AM »

Hey,

I have created screen records of the problems.

Borders brake: https://youtu.be/zyeei8Fe_JM

Input brake: https://youtu.be/AtXm63L7hX8

False width from onResizeColumn: https://youtu.be/MMtRVhhRfD8

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


View Profile WWW
« Reply #6 on: August 07, 2015, 03:03:50 AM »

stworthy, what to do with the resize of the columns? The current solution
breaks the datagrid.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #7 on: August 07, 2015, 05:41:25 AM »

Please try to download the 'datagrid-filter.js' file from http://www.jeasyui.com/extension/datagrid_filter.php
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #8 on: August 07, 2015, 06:35:47 AM »

Thanks, I tested the updated file you brought but unfortunately after I played with the datagrid a bit it still brakes.

Here is what I got after a few resizes:


Maybe the logic in the onResizeColumn event should be changed?
« Last Edit: August 07, 2015, 06:37:29 AM by A-K » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #9 on: August 07, 2015, 07:00:03 AM »

Please try this example http://jsfiddle.net/3L4ej4dx/79/
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #10 on: August 07, 2015, 07:08:51 AM »

This works great! Thanks!

The "resizeFilter" is a great feature!
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!