fother
23 Jan 2009, 10:52 AM
in this example http://extjs.com/explorer/#treetable (I wont copy, paste and replace the code to put in onModuleLoad method)
change to columns order for
List<TreeTableColumn> columns = new ArrayList<TreeTableColumn>();
TreeTableColumn column = new TreeTableColumn("date", "Date", 170);
column.setRenderer(new DateTimeCellRenderer(DateTimeFormat.getMediumDateTimeFormat()));
columns.add(column);
column = new TreeTableColumn("size", "Size", 120);
columns.add(column);
column = new TreeTableColumn("name", "Name", 300);
column.setMinWidth(75);
columns.add(column);
column = new TreeTableColumn("date", "Date", 170);
column.setRenderer(new DateTimeCellRenderer(DateTimeFormat.getMediumDateTimeFormat()));
columns.add(column);
column = new TreeTableColumn("size", "Size", 120);
columns.add(column);
you can see that until render the column defined in
final TreeTableBinder<FileModel> binder = new TreeTableBinder<FileModel>(table, store);
binder.setDisplayProperty("name");
return always the property name.. :-/
change to columns order for
List<TreeTableColumn> columns = new ArrayList<TreeTableColumn>();
TreeTableColumn column = new TreeTableColumn("date", "Date", 170);
column.setRenderer(new DateTimeCellRenderer(DateTimeFormat.getMediumDateTimeFormat()));
columns.add(column);
column = new TreeTableColumn("size", "Size", 120);
columns.add(column);
column = new TreeTableColumn("name", "Name", 300);
column.setMinWidth(75);
columns.add(column);
column = new TreeTableColumn("date", "Date", 170);
column.setRenderer(new DateTimeCellRenderer(DateTimeFormat.getMediumDateTimeFormat()));
columns.add(column);
column = new TreeTableColumn("size", "Size", 120);
columns.add(column);
you can see that until render the column defined in
final TreeTableBinder<FileModel> binder = new TreeTableBinder<FileModel>(table, store);
binder.setDisplayProperty("name");
return always the property name.. :-/