Author Topic: Column resize when width % is designated.  (Read 1974 times)

kiwon34

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 52
    • View Profile
Column resize when width % is designated.
« on: October 18, 2019, 11:14:20 am »
Hello,

https://paramquery.com/pro/demos/fluid_window
In this demo, I am not able to resize the column by mouse moving when each column's width is set width %.

I need to set the column with %, and also need to resize the column.
Is there any way to do so?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Column resize when width % is designated.
« Reply #1 on: October 18, 2019, 05:31:04 pm »
column width in % and manual resize of the same column are contradictory

because column loses its % width the moment you resize it directly.

All you can do is: turn the column into fixed width after grid initialization so that it can be resized manually thenceforth.

Code: [Select]
                       complete: function(){
var Cols = this.Columns();
Cols.alter(function(){
Cols.each(function(col){
col.width = col._width; //make it fix width.
col.resizable = true;
})
})
}
« Last Edit: October 18, 2019, 05:35:01 pm by paramvir »