Hi All

I'm a new GXT learner, and i tried add some ModelDatas into a normal grid, but it doesn't work,

The following is code:

public class TestData extends BaseModel implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4696437601702839574L;

private String name;
private int age;
private String school;


public String getSchool() {
return get("school");
}
public void setSchool(String school) {
set("school", school);
}
public String getName() {
return get("name");
}
public void setName(String name) {
set("name", name);
}
public int getAge() {
return get("age");
}
public void setAge(int age) {
set("age", age);
}
/**
* @param name
* @param age
* @param school
*/
public TestData(String name, int age, String school) {
super();
this.name = name;
this.age = age;
this.school = school;
}
/**
*
*/
public TestData() {
super();
}
}


//Snippet code

//TODO: add a simple Grid to VerticalPanel
List<ColumnConfig> gridColumnConfigs = new ArrayList<ColumnConfig>();
ColumnConfig column1 = new ColumnConfig();
column1.setId("name");
column1.setHeader("Name");
column1.setAlignment(HorizontalAlignment.CENTER);
column1.setWidth(200);

gridColumnConfigs.add(column1);

ColumnConfig column2 = new ColumnConfig();
column2.setId("age");
column2.setHeader("Age");
column2.setWidth(200);

gridColumnConfigs.add(column2);

ColumnConfig column3 = new ColumnConfig();
column3.setId("school");
column3.setHeader("School");
column3.setAlignment(HorizontalAlignment.LEFT);
column3.setWidth(200);

gridColumnConfigs.add(column3);

ColumnModel columnModel = new ColumnModel(gridColumnConfigs);
ListStore<TestData> datas = new ListStore<TestData>();

TestData td1 = new TestData("name1", 21, "school1");
datas.add(td1);
TestData td2= new TestData("name2", 21, "school2");
datas.add(td2);

Grid<TestData> grid = new Grid<TestData>(datas, columnModel);

grid.setSize(600, 300);
grid.setStyleAttribute("borderTop", "none");
grid.setAutoExpandColumn("name");
grid.setBorders(true);
//grid.setStripeRows(true);
//grid.setColumnLines(true);
//grid.setColumnReordering(true);

formPanel.add(grid);






I need you guys help to fix this issue, thank you very much!

Regards