Replies: 1 comment 2 replies
-
I think there was similar discussion on the SlickGrid project but I don't think anything came out of that. The thing is that these plugins were created by other users long time ago, the only thing I've done was to migrate them to the project and add unit tests for what existed. So yes feel free to create a PR, below are the steps you can probably take
The approach that we used for cancelling (e.g. // user could cancel the Row Detail opening when event is returning false
if (this.onBeforeRowDetailToggle.notify({ grid: this._grid, item: dataContext }, e, this).getReturnValue() === false) {
return;
} That's great but how will you have access to that code on the user's side? So in order to expose these stuff in the grid option, I simply subscribe to the SlickEvent and when it's called, I then compare with an if statement and execute the code when it's defined in the grid option, for example with the Oh and I created a list of all the events in the docs here that exist in the project but for some reasons it looks like I've missed the one from the
Yeah it would have been better since I can't copy permalink of code to another repo :D |
Beta Was this translation helpful? Give feedback.
-
So I've been looking around stackoverflow and the code base but didn't find anything in order to be able to limit the paste action both for the Excel Copy Buffer and normal copy pastes.
Is there something like a onBeforeCellPaste event, in tandem with onPasteCells where I could return a boolean to decide whether the paste should happen or not?
Alternatively, it might also be an option to modify the paste behavior to not allow pastes if the target cell/col has no editor assigned.
I've tried using onBeforeEditCell of the column, but that does not get triggered for pastes. Using that would be a third option as far as I see.
If there is no way yet existing to support this functionally, as always, I'm happy to provide a PR upon agreement of which path you'd like to approach @ghiscoding
EDIT: I recon this would be primarily a PR for the Slickgrid-Universal repo, sorry for starting the discussion here. I just thought about it after writing this :)
Beta Was this translation helpful? Give feedback.
All reactions