0

get listcells label from listitem

asked 2009-09-02 06:10:41 +0800

Kailas gravatar image Kailas
144 1 1

Hello friends

in my listbox there are 3 listheaders and i have to get 3 listcell in listitem.
All these listitem & listcell are dynamically created.
Then how to get 3 listcell label.

By using following code i am getting 1'st listcell label

System.out.println("Listcell label............."+list_box.getItemAtIndex(1).getLabel());

how to get other listcell


plz. reply.

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-09-02 06:41:15 +0800

woodyki gravatar image woodyki
168

list_box.getItemAtIndex(1).getLabel() this is just the label of a Listitem.

It should be:
Listitem item = list_box.getItemAtIndex(index);
Listcell cell = item.children.get(column)); //column count from 0
String label = cell.getLabel();

link publish delete flag offensive edit

answered 2009-09-02 06:54:05 +0800

Kailas gravatar image Kailas
144 1 1

Thankx woodyki

Listcell cell = item.children.get(1);

but get() is unknown method for listitem

plz suggest other way

link publish delete flag offensive edit

answered 2009-09-02 07:11:21 +0800

woodyki gravatar image woodyki
168

Just a little correction:
Listcell cell = (Listcell)item.children.get(column));

The component children is a List and the get() is just a method of a List.

link publish delete flag offensive edit

answered 2009-09-02 07:24:06 +0800

Kailas gravatar image Kailas
144 1 1

Thanks it works

woodyki

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-09-02 06:10:41 +0800

Seen: 330 times

Last updated: Sep 02 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More