ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: jplevene on April 22, 2023, 12:54:05 am

Title: Grid auto width scroll bars
Post by: jplevene on April 22, 2023, 12:54:05 am
I have set the following options:

   stripeRows: true, // Show stripes
      menuIcon: false,
      scrollModel:{autoFit:true},
      flex: { on: true },
      showTitle: false, // Hide table title
      wrap: false, // Cell content on one line
      hwrap: false, // header content on one line
      showTop: false, // Hide top  (including col move icons)
      selectionModel: { type:"row", mode:"single", column:false, all:false}, // Select rows
      wrap: false,

I also have some columns with min and max width set.  The issue is that due to the min and max width, when the grid is not wide enough to fit all the columns, there is no horizontal scroll bar, instead the far right columns are clipped off screen.  I need the flexible auto width to the screen, and when that is not possible (minimum width due to column width constraints), the horizontal scroll bar should appear instead of clipping the grid.

Also, when the data is empty, as in dataModel: {data: []}, how do I remove/hide or disable the "undefined" message?
Title: Re: Grid auto width scroll bars
Post by: jplevene on April 22, 2023, 01:05:21 am
Answering my own question regarding hiding the "undefined" for no rows, just set the following CSS:

Code: [Select]
.pq-grid-norows { display:none;}
Title: Re: Grid auto width scroll bars
Post by: paramvir on April 24, 2023, 01:17:42 pm
1) It's not feasible.

2) undefined message would go away by including the localization file, it's a required file.
Title: Re: Grid auto width scroll bars
Post by: jplevene on May 18, 2023, 07:11:52 pm
Thanks Paramvir,

Regarding point 1, is there any way to set some columns as fixed width, make the grid try and fill the full width, however if it is too wide due to the fixed width columns, enable horizontal scrolling?  Other grids like jqGrid get around this.

J
Title: Re: Grid auto width scroll bars
Post by: paramvir on May 19, 2023, 02:09:18 pm
Please try wdith: 'flex' along with maxWidth of the grid.

https://paramquery.com/pro/api#option-width

https://paramquery.com/pro/api#option-maxWidth
Title: Re: Grid auto width scroll bars
Post by: camillari1 on April 18, 2024, 07:32:34 am
I'm having the same problem.
Title: Re: Grid auto width scroll bars
Post by: paramvir on April 18, 2024, 01:07:41 pm
Please use wdith: 'flex' along with maxWidth of the grid instead of scrollModel.autoFit: true