ItemTap on RadListView in Angular


#1

How do I get the item on ItemTap in Radlistview?

I’m trying this:

onListItemTap(args: ListViewEventData){
        console.log("list item tapped");
        console.log(args.object);
        let stack = <StackLayout>obj.getChildAt(0);
        let lbl = <Label>stack.getChildAt(0);
        let dialogText  = lbl.text;
        dialogs.alert({
            message: dialogText,
            okButtonText: "OK",
        });
    }

I want to get the label inside the item and display it in a dialog if the item is clicked.


#2

May I know why don’t you try accessing your data instead of accessing actual element?


#3

Because I hadn’t thought of it :slight_smile: