Grid selection disable issue


#1

why if i use function in https://docs.dhtmlx.com/suite/grid__usage_selection.html grid is enable editing and i use grid.selection.disable(); is still can editing???


#2

I am unable to reproduce that behavior. See this snippet: https://snippet.dhtmlx.com/z6jj0ki7

I added grid.selection.enable() at the end of the function to create the Grid; it does not enable editing. Can you provide a snippet demonstrating the behavior?


#3

https://snippet.dhtmlx.com/phvh7iga


#4

It seems more like you want to be able to turn editing on and off; selection is something else entirely. I don’t think there’s a way do that without destructing and recreating the grid. I changed the Multiselection checkbox to Editing to demonstrate how you can do it. https://snippet.dhtmlx.com/m2g5ah6e

To enable editing data in a grid, set the following when creating the grid (which you have in your snippet)

editable: true

To disable editing, use

editable: false

#5

The problem is if i set editabel true not all of colomn but one ore more https://snippet.dhtmlx.com/x1w2avne


#6

You may use the beforeEditStart event to block the editing operation if it is needed. just try to return false from that event
https://docs.dhtmlx.com/suite/grid__api__grid_beforeeditstart_event.html