ParamQuery grid support forum

General Category => Suggest new features => Topic started by: jplevene on June 29, 2024, 12:03:43 am

Title: Add a selectionModel.mode = "none"
Post by: jplevene on June 29, 2024, 12:03:43 am
Adding a selectionModel.mode = "none" prevents rows, cells, columns, etc. from being selected which makes it good for a selector when there are checkboxes.

For example if I had a tree with checkboxes on each node and all I am using the tree for is selecting checkboxes, selecting a row, column or cell is of no use.  This is evident on column filters (see here https://paramquery.com/pro/demos), there is no point having a selected row in the drop down filter.

Also it would be nice to have an option when clicking the whole row (outside the text) to select/deselect the checkbox
Title: Re: Add a selectionModel.mode = "none"
Post by: paramvir on July 31, 2024, 04:16:44 pm
This feature is already present in the grid.

selection of rows, cells, columns, etc. can be prevented by setting selectionModel.type = null
Title: Re: Add a selectionModel.mode = "none"
Post by: jplevene on July 31, 2024, 06:18:31 pm
Sorry, it didn't work in columnModel

Code: [Select]
selectionModel: {type:null},
Title: Re: Add a selectionModel.mode = "none"
Post by: paramvir on July 31, 2024, 06:52:02 pm
To disable spreadsheet like row and column selections ( by clicking on the headers ), please set selectionModel.row and selectionModel.column to false

It's better to refer the API docs:

https://paramquery.com/pro/api#option-selectionModel
Title: Re: Add a selectionModel.mode = "none"
Post by: jplevene on July 31, 2024, 07:14:48 pm
Thanks