Author Topic: Extra empty space in table with few columns  (Read 4997 times)

youngvan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 42
    • View Profile
Extra empty space in table with few columns
« on: July 02, 2014, 05:52:49 pm »
Hi!

I have script which creates dynamical tables with 2 and up to 100 columns.
If table has only few columns after the last column it appears extra empty space. Is it possible to remove it or set autowidth for table?
I've tried to set flexWidth option, but it doesn't suitable in my case, because I need fixed width for columns.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Extra empty space in table with few columns
« Reply #1 on: July 02, 2014, 06:14:53 pm »
1) Please mention the version.

2) whether you have been using virtual or non-virtual mode.

3) What's the value of scrollModel.

youngvan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Extra empty space in table with few columns
« Reply #2 on: July 02, 2014, 07:29:57 pm »
1) ParamQuery Pro v2.1.0
2) "virtualX":false, "virtualY":false. (My script activates this modes only if quantity of columns more than 10 or rows more than 100)
3) scrollModel : { pace : 'fast' }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Extra empty space in table with few columns
« Reply #3 on: July 02, 2014, 07:40:17 pm »
Could you please attach a screenshot depicting the issue.

youngvan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Extra empty space in table with few columns
« Reply #4 on: July 02, 2014, 07:41:09 pm »
Here an example:

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Extra empty space in table with few columns
« Reply #5 on: July 02, 2014, 07:52:48 pm »
From the screenshot it appears your grid width is > than sum total of visible columns ( and there is no horizontal scrolling)

to remove empty space,

1) either you have to shrink the grid's width to sum total of column widths. use flexWidth : true in this case.

2) or expand columns to fit properly in grid. use scrollModel: { autoFit: true, other options... }

There is also a 3rd option scrollModel: { lastColumn: 'auto', ... } which works well in virtual mode and when there is horizontal scrolling.
« Last Edit: July 02, 2014, 07:55:01 pm by paramquery »