EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: A-K on August 03, 2015, 06:43:47 AM



Title: onResizeColumn problem.
Post by: A-K 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 (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/ (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.


Title: Re: onResizeColumn problem.
Post by: stworthy on August 03, 2015, 07:32:26 AM
Please try this updated example http://jsfiddle.net/3L4ej4dx/61/


Title: Re: onResizeColumn problem.
Post by: A-K on August 03, 2015, 07:47:12 AM
Thanks!


Title: Re: onResizeColumn problem.
Post by: A-K 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/ (http://jsfiddle.net/3L4ej4dx/67/)

Try to double click the header columns and resize them and at some point it will brake.
(http://i62.tinypic.com/2hzi8he.png)

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:
(http://i57.tinypic.com/9k9z5t.png)

I then made it a bit bigger and got width 74:
(http://i59.tinypic.com/2a7hrh4.png)

Any patch for this?

Thanks!


Title: Re: onResizeColumn problem.
Post by: stworthy 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.


Title: Re: onResizeColumn problem.
Post by: A-K on August 05, 2015, 07:18:27 AM
Hey,

I have created screen records of the problems.

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

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

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



Title: Re: onResizeColumn problem.
Post by: A-K on August 07, 2015, 03:03:50 AM
stworthy, what to do with the resize of the columns? The current solution
breaks the datagrid.


Title: Re: onResizeColumn problem.
Post by: stworthy 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


Title: Re: onResizeColumn problem.
Post by: A-K 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:
(http://i61.tinypic.com/hs2duh.png)

Maybe the logic in the onResizeColumn event should be changed?


Title: Re: onResizeColumn problem.
Post by: stworthy on August 07, 2015, 07:00:03 AM
Please try this example http://jsfiddle.net/3L4ej4dx/79/


Title: Re: onResizeColumn problem.
Post by: A-K on August 07, 2015, 07:08:51 AM
This works great! Thanks!

The "resizeFilter" is a great feature!