SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

Cancel opening detail panel on click

Open MrMoronIV opened this issue 6 years ago • 3 comments

Following this example: http://6pac.github.io/SlickGrid/examples/example16-row-detail.html

Is there a way to cancel the open action after the row is clicked? Or can I toggle if the plugin is active or not on the fly? I want to have one panel open as a maximum and force the user to click [Save] or [Cancel] in the detail panel before a new one can be opened.

MrMoronIV avatar May 21 '19 09:05 MrMoronIV

Again all the documentation is directly inside the Row Detail Plugin, I assume you can do what you want with the few events available and then stop the event from bubbling up

ghiscoding avatar May 21 '19 13:05 ghiscoding

As far as I can tell this isn't possible since returning false inside these events only avoids the rest of the code below it to be ran, panels are still opening no matter what I do inside these evemt listeners, hence this question :)

MrMoronIV avatar May 23 '19 00:05 MrMoronIV

You could use the expandableOverride for stopping others opening e.g. You have a bool that you update to say if one is open and update the override to hide all the others while it's open.

Not the best way to do it but this is just one way I can think of doing it.

As for stopping the collapse happening removing the detailView-toggle from the item while it's being edited should stop it being able to be collapsed. (Not sure what other issues this would cause tho)

Hope this at least gives you somewhere to start looking

SatanEnglish avatar May 26 '19 22:05 SatanEnglish

better late than never, now available in latest version 5.1.0 also note that a lot changed since this issue was created, we dropped jQuery/jQueryUI and we migrated to TypeScript

ghiscoding avatar Oct 03 '23 04:10 ghiscoding