Author Topic: Paramquery : Scrollbar  (Read 2496 times)

HardikKumar.Zaveri

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 13
    • View Profile
Paramquery : Scrollbar
« on: April 08, 2019, 10:47:54 pm »
Hi,

Can you please suggest, how can we set default vertical scrollbar for PQGrid globally? I mean is there a way where we can either setup css class or through Jquery we can set vertifical scrollbar for PQ Grid?  So that when we add PQ Grid, it has vertical scrollbar appearing without setting up any property.

Also, if you can share global setting to setup horizontal scrollbar that would be great.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Paramquery : Scrollbar
« Reply #1 on: April 09, 2019, 09:58:57 am »
Scrollbars appear on their own when height/ width of content is more than grid display area. Scrollbars can'be forced to appear otherwise.

Grid has 2 type of settings:

height/ width: flex ( grid expands so as to display all content without scrollbars )

height / width: number ( fixed dimensions, so scrollable area )

Since you need scrollable grids, all you have to do is set fixed height/ width of either the individual grids

Code: [Select]
options = {
  width: 400,
  height: 400,
  ...
}

pq.grid( selector, options )

or all grids at once ( by overriding default options of the grid ).

Code: [Select]
$.paramquery.pqGrid.defaults.height = 400
$.paramquery.pqGrid.defaults.width = 400
« Last Edit: April 09, 2019, 02:09:10 pm by paramquery »