Reorder list - pin certain items


I have a reorder list working, but I want some of the items to not be draggable. Is there a way to set certain items to not allow them to be dragged? I added the reorder handle to the templates I want to be dragged, but the ones I don’t want to be dragged, even though they don’t have handles, they are still draggable.


Use the itemReorderStartingEvent event.


I’ve tried and can’t seem to get that event to fire.

<RadListView #dragList [items]="dataItems" 
public onItemReorderStarted(args: ListViewEventData){
        let item = this._dataItems.getItem(+args.index);
        console.log("On Item Reorder Started");
        if (item['key'] === 'category'){
            return args.returnValue = false;

I never see a console.log in my terminal when I start reordering.


That’s the event name constant, when you use the even name directly it should be (itemReorderStarting)="...")


Thanks @manojdcoder. How did you figure this out? I can’t find reference to itemReorderStarting in the documentation or the api. Everything says ‘itemReorderStartingEvent’


Pro UI’s documentation may not be detailed, but if you refer the basics of NativeScript event handling, this is the usual procedure they follow while defining events.