clarification onBeforeDrag evnt when multi-select s enabled

I have enabled Multi-selection and i wanted to block drag operation for few use-case alone. i notice onBeforeDrag event is triggered only one time when more than one selected fordnd operation with first item selected passed to this call back function. so we should use grid.getSelectedRowId inorder to get all list of rows selected for D-n-D operation. is this right way or please let me know if i misunderstood it.

Thank you

you’re right.
onBeforeDrag event occurs right when the user grabs the row to drag. At that moment drag process doesn’t catch all selected rows yet.
So the best way is to call getSelectedRowId method.
Or to use the ondrag event (but it occurs too late for you, I suppose)