Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

How to stop listview header click?

Hi,

 

I have implemented a listview using qml and noticed that its header is clickable.How can I stop it ?Please reply

Rujuta Trivedi
Highlighted
Developer
Posts: 230
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: How to stop listview header click?

I did it this way

 

           ListView {
                id: myList
                dataModel: GroupDataModel { }
                onTriggered: {
                    var str = indexPath.toString();
                    
                    if(str.indexOf(",") != -1) {
                        select(indexPath)
                    }
                }
                onSelectionChanged: {
                    if (selected) {
                        // do something

                        clearSelection()
                    }
                }
            }

 

______________________________________________________
BB10-OAuth: GitHub