Open ninopetrovic opened 5 years ago
Hi Nino
We understand that you need to prevent the multiselection on dragging the mouse and drop the row in selected index without selecting the record. We have achieved your requirement using rowDragStart event of ejGrid. In that event we have selected the dragged row. So that dragged element can be dropped properly at specific index.
<ej-grid #grid [dataSource]="gridData" (rowDragStart)="onRowDragStart($event)">
onRowDragStart(e: any){
this.Grid.widget.selectRows(e.target.index());
}
Refer the below link for the JS playground sample
Sample: https://jsplayground.syncfusion.com/kgcjrd0i
Refer the API documentation for your reference
https://help.syncfusion.com/api/angular/ejgrid#methods:selectrows
https://help.syncfusion.com/api/angular/ejgrid#events:rowdragstart
Regards,
Vignesh Natarajan
Hello Vignesh,
Thank you! Your solution works for me.
Best regards, Nino Petrovič
Hello,
I implemented a grid in my website with dragAndDrop enabled and it works fine. But, i dont like that i have to select the row first before draging it to wanted position. if i just try to drag it, it instantly goes to multiselecting rows. If i try to disable multiselect it does't do anything.
B.R. Nino Petrovic