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: 148
Registered: ‎01-08-2013
My Device: 9860
My Carrier: Airtel
Accepted Solution

Listview with GridListLayout

Hi All,

    I have created a list view with GridListLayout of 3 columnCount . My problem is I can not access the data from listview of specific column item click. I can access only first column item value in list row using onTriggered. Please help me.

 

Thanks & Regards

Sanjit

Developer
Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Listview with GridListLayout

Part of code which you use in onTrigerred signal will help us



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Developer
Posts: 148
Registered: ‎01-08-2013
My Device: 9860
My Carrier: Airtel

Re: Listview with GridListLayout

  onTriggered: {
                var selectedItem = dataModel.data(indexPath);
               

                if (indexPath.length == 1) {

                } else {
                    var selectedItem = dataModel.data(indexPath);
                    console.log("selectedItem:"+ indexPath);
                    //TeamID is selected item
                    console.log(selectedItem.TeamID);
                    navigationPane.push(eventMyFavouriteTeamDetails);

                }

            }

 

Developer
Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Listview with GridListLayout

[ Edited ]

Remove the statements

if (indexPath.length == 1) {
 // you are still here when click, i think
} else {
}

Just use

var selectedItem = dataModel.data(indexPath);
console.log("selectedItem:"+ indexPath);
//TeamID is selected item
console.log(selectedItem.TeamID);
navigationPane.push(eventMyFavouriteTeamDetails);

In my app i use both ListView layouts. Grid and Stack. But i don't use any statements onTrigerred signal Smiley Wink



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Highlighted
Developer
Posts: 148
Registered: ‎01-08-2013
My Device: 9860
My Carrier: Airtel

Re: Listview with GridListLayout

Actually in a row have three item with three different team id . When I click on this row item I can not get the specific click team id .