Author Topic: Option to allow horizontal scroll bar when needed when scrollModel.autofit=true  (Read 461 times)

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 135
    • View Profile
Code: [Select]
colModel: {
   ...
   colModel : [
      {dataIndx:"ID", minWidth:"60", maxWidth:80},
      {dataIndx:"TITLE", minWidth:"200"},
      {dataIndx:"ALT_TITLE", minWidth:"200"},
      {dataIndx:"LOCATION", minWidth:"200"},
      {dataIndx:"DESCRIPTION", minWidth:"200},
      {dataIndx:"PART_NUMBER", minWidth:"100"},
      {dataIndx:"LAST_UPDATE", minWidth:"100"}
   ],
   scrollModel:{autoFit:true},
   flex: {on:true, all:false, one:false},
   width: "100%",
   height: "100%",
   ...
}

The issue is that minWidth is set and when the table is lets say 500 wide, I can sometimes "scroll" to the column by clicking on it if it is partially shown, but I don't have a horizontal scroll bar to scroll to it or the ones past that.

Request an option as another value in scrollModel.autoFitScrollbar=true or something that ONLY displays the horizontal scroll bar when it is needed due to column minWidth values oversizing.  If the grid is wide enough to contain all minWidth values, then there is no scroll bar and it acts like before.

I feel this needs to be an option and not a default behaviour due to backwards compatibility.

This is also very important for adaptive pages, as when switching to vertical mobile, this would be necessary.  This feature would make pqGrid more adaptive compatible.
« Last Edit: August 03, 2024, 05:31:18 am by jplevene »

joshua519

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hello everyone,

I?m new to the forum and exploring ParamQuery Grid for a responsive project. I found this thread really insightful, but I?m curious about one aspect.

If we enable a feature like
Code: [Select]
scrollModel.autoFitScrollbar=true as suggested, would the horizontal scrollbar appear dynamically only when necessary, or would it remain visible at all times even when the grid width matches the minWidth values of the columns?

Also, are there any known workarounds or examples for implementing something similar in the current version while waiting for this feature to be considered?

Thanks in advance for your guidance!