开发者

How to set heading or field label for list view in GXT.?

开发者 https://www.devze.com 2023-01-17 07:15 出处:网络
I\'m new to GXT, I\'m developing a project by using GXT 2.0.1. I want to set field label for a list view. How to set field label.?

I'm new to GXT, I'm developing a project by using GXT 2.0.1. I want to set field label for a list view. How to set field label.?

ListView<Stock> list2 = new ListView<Stock>();
    list2.setDispl开发者_StackOverflow中文版ayProperty("name");
    store = new ListStore<Stock>();
    store.setStoreSorter(new StoreSorter<Stock>());
    list2.setStore(store);


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);


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

0

精彩评论

暂无评论...
验证码 换一张
取 消