Closed VedNirmal closed 5 years ago
You should be able to use it, I don't have any examples made for this plugin but the plugin file is imported here. So technically, all you need is a reference to the grid instance, you can see Wiki - SlickGrid Object and then use it. You don't always need TypeScript, my lib added a lot of type definitions but SlickGrid itself has none, that didn't stop me from building the lib.
Quick code out of my head
declare var Slick: any;
export class MyExample {
gridObj: any;
moveRowsPlugin: any;
angularGridReady(angularGrid: any) {
this.angularGrid = angularGrid;
this.gridObj = angularGrid.slickGrid;
this.gridObj.setSelectionModel(new Slick.RowSelectionModel());
this.moveRowsPlugin = new Slick.RowMoveManager({
cancelEditOnDrag: true
});
this.gridObj.registerPlugin(moveRowsPlugin);
}
Thanks much!! It really helped me. Appreciated.
Reopening as I will push a new version sometime this week that will add this plugin and an example.
@VedNirmal
A new Example 17 now shows the Row Move Manager Plugin. This was released under NPM version 1.8.0
, so go try it out
Also if you like the lib, you can also up vote ⭐️ Cheers
I'm submitting a bug report I'm submitting a feature request
Please tell us about your environment:
Operating System: Windows [7|8|8.1|10]
Browser: Chrome XX
Language: TypeScript, Angular 6
Current behavior: I'm using Angular-SlickGrid and trying to implement the drag and drop feature. I referred following URL to implement the same. https://mleibman.github.io/SlickGrid/examples/example9-row-reordering.htmI
I was trying to use below code snippet : this.gridObj.setSelectionModel(new Slick.RowSelectionModel()); var moveRowsPlugin = new Slick.RowMoveManager(); self.gridObj.registerPlugin(moveRowsPlugin);
Not able to use RowMoveManager as type script defination is not available. Please help me on this issue.
Expected/desired behavior:
What is the expected behavior?
What is the motivation / use case for changing the behavior?