tags:

views:

49

answers:

2

Hi, Im new to GXT, Im developing project by using GXT 2.0.1. I want set field label on list view. How to set field label.?

ListView<Stock> list2 = new ListView<Stock>();
    list2.setDisplayProperty("name");
    store = new ListStore<Stock>();
    store.setStoreSorter(new StoreSorter<Stock>());
    list2.setStore(store);
A: 

You can wrap the ListView in a ContentPanel and then set the heading:

ContentPanel cp = new ContentPanel();
cp.setHeading("Stocks");
cp.setLayout(new FitLayout());
cp.add(list2);
add(cp);
reverendgreen
A: 

Use ListField Call setFieldLabel("name") on your field. Make sure you add it to a container with a FormLayout.

kabram