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

Java Development

Reply
Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550
Accepted Solution

How can i get Item from ListField

I want to get the Item from ListField. But I am not getting.

For Getting Index of Selected Item

We Write listFeed.getSelectedInde(); // It Returns the Index Of SelectedItem

 

But I want Item name.

How can i Achieve this.

Any One Plz Tell me.

My Project Stucked about this Problem.

Developer
Developer
Posts: 42
Registered: ‎02-17-2009
My Device: Not Specified

Re: How can i get Item from ListField

try listFeed.getSelection();

Developer
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: How can i get Item from ListField

Look at the drawListRow method in the ListFieldCallback. That code is responsible for displaying the name for each row; you can use the same logic to obtain the name for other purposes.




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Highlighted
Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: How can i get Item from ListField

Thank u Ted, Got  What u said.