the below table is the requirement.
1) based on the input field expandable-> i can generate the tree level in tree grid.
2) based on the NoOfColumn field, i should display the number of columns in below table. here unable to display the number of columns dynamically.
I used the TreeGrid in GXT 2.2.3. and my pojo class extends the BaseTreeModel class.

Please advise me to display the column in dynamically in Treegrid.

Table: Please refer the table from the attached image.

My Pojo class:

import com.extjs.gxt.ui.client.data.BaseTreeModel;
import com.extjs.gxt.ui.client.data.BeanModelTag;

public class Folder extends BaseTreeModel implements Serializable{


private static final long serialVersionUID = 1L;
private static int ID=0;

public Folder(String name, BaseTreeModel[] children, String desc, Map<String, Object> properties){
this(name);
set("name",name);
set("desc",desc);
setProperties(properties);
for(int i=0;i<children.length;i++){
add(children[i]);
}
}
public Integer getId(){
return (Integer) get("id");
}
public String getName(){
return (String) get("name");
}
public String getLine1(){
return (String) get("line1");
}
public String getLine2(){
return (String) get("line2");
}

}TreeGrid.jpg