Author Topic: Disable grid while provide scrolling  (Read 2302 times)

Rasith

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Disable grid while provide scrolling
« on: August 04, 2021, 04:30:43 pm »
treeGridObj.option("disabled", true) after adding this i tried setting the CSS class as you suggested, but still scroll is not working.

I added that CSS in treeGridObj.addClass("pq-grid-disable");
 I see CSS is loaded, but i can't see the scroll.
« Last Edit: August 04, 2021, 05:30:08 pm by bhubanmohan »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable grid while provide scrolling
« Reply #1 on: August 05, 2021, 09:02:13 am »
scroll is not supposed to work when the grid / treegrid is disabled.

Please let me know your purpose of disabling the treegrid.

Rasith

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Disable grid while provide scrolling
« Reply #2 on: August 05, 2021, 10:32:44 am »
we need this in one of the functionality when the tree-grid disabled user interested to see all the tree nodes..

Any solution to implement the scroll when grid is disabled  or any way to disable the edit mode for whole grid ?
« Last Edit: August 05, 2021, 11:04:39 am by bhubanmohan »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable grid while provide scrolling
« Reply #3 on: August 05, 2021, 11:29:04 am »
Please use editable: false option

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

Rasith

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Disable grid while provide scrolling
« Reply #4 on: August 05, 2021, 11:47:58 am »
Example you gave this is  during initialisation. Assume we already initialised  our tree and we want to fire this(disable the edit mode for tree) in some event.
« Last Edit: August 05, 2021, 11:58:29 am by bhubanmohan »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable grid while provide scrolling
« Reply #5 on: August 05, 2021, 12:11:31 pm »
set the editable option after initialization is also mentioned in the API

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

Rasith

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Disable grid while provide scrolling
« Reply #6 on: August 05, 2021, 12:29:13 pm »
Even setting the editable option i can edit, i can add a new field. :(

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable grid while provide scrolling
« Reply #7 on: August 05, 2021, 01:18:21 pm »
editable option decides editability of cells only.

Please share your complete requirements ( what do you want to disable and what do you want to keep enabled ) along with a jsfiddle.

Rasith

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Disable grid while provide scrolling
« Reply #8 on: August 05, 2021, 03:36:52 pm »
We have an external event, kind of freeze.
when we click on that we need to disable the whole grid for adding/editing field, user can only read all the nodes(without scroll we can't read all the nodes).

Its kind of disabling Tree Grid and providing scroll option to read all the nodes.



« Last Edit: August 05, 2021, 05:39:54 pm by bhubanmohan »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable grid while provide scrolling
« Reply #9 on: August 06, 2021, 10:10:51 am »
There is no single option for it. It may be introduced in upcoming version.

For now, you can disable the controls in grid selectively.

First make the cells non - editable by using editable option: https://paramquery.com/pro/api#option-editable

Then use this to disable all inputs and jQueryUI buttons inside the treegrid.

Code: [Select]
grid.widget().find(":input").prop("disabled", true);
grid.widget().find("button").button("option", "disabled", true);