How to set heading or field label for list view in GXT.?
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.
精彩评论