Author Topic: grid.flex() not working when the last column doesn't have a set width  (Read 1067 times)

STXSupport

  • Pro OEM
  • Newbie
  • *
  • Posts: 2
    • View Profile
We have an issue using grid.flex() when the last column does not have a width set. 
All of our columns do not have the width set in the configs.

We are setting the gridConfig.paramquery property with
               minWidth: 500,
               width: '100%',                       
               scrollModel: { autoFit: true }.

Code to flex grid:

$grid.on('pqGrid:create', function (e, ui) {
             var grid = $grid.pqGrid('instance');
             grid.flex();
         });


Resulting grid


When we push a column with a fixed width into the columnConfigs as the last column then it works as expected

Resulting grid


Would you add the functionality to not use a fixed width on the last column when using grid.flex()?

Thank you

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: grid.flex() not working when the last column doesn't have a set width
« Reply #1 on: November 20, 2021, 11:40:46 am »
scrollModel: { autoFit: true } and flex() have contradictory purpose which can't be resolved simultaneously.

Please remove scrollModel: { autoFit: true } and flex() would work fine.

Please let me know if you need further assistance on this.

BTW your attachments are missing.
« Last Edit: November 20, 2021, 11:45:50 am by paramvir »