PDA

View Full Version : [FIXED] header group broken in rc1



fother
25 Jun 2009, 9:56 AM
code examples



public void onModuleLoad() {

List<ColumnConfig> gridConfigs = new ArrayList<ColumnConfig>();

ColumnConfig column = new ColumnConfig("data1", "data1", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data2", "data2", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data3", "data3", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data4", "data4", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data5", "data5", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data6", "data6", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data7", "data7", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data8", "data8", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

column = new ColumnConfig("data9", "data9", 120);
column.setAlignment(HorizontalAlignment.RIGHT);
gridConfigs.add(column);

ColumnModel gridColumnModel = new ColumnModel(gridConfigs);

gridColumnModel.addHeaderGroup(0, 0, new HeaderGroupConfig("group1", 1, 5));
gridColumnModel.addHeaderGroup(0, 4, new HeaderGroupConfig("group2", 1, 2));
gridColumnModel.addHeaderGroup(0, 6, new HeaderGroupConfig("group3", 1, 3));

ListStore<ModelData> store = new ListStore<ModelData>();

Grid<ModelData> grid = new Grid<ModelData>(store, gridColumnModel);
grid.setSize(700, 200);

RootPanel.get().add(grid);

}
to work fine I need use this code.. its wrog according to the java doc


gridColumnModel.addHeaderGroup(0, 0, new HeaderGroupConfig("group1", 1, 5));
gridColumnModel.addHeaderGroup(0, 4, new HeaderGroupConfig("group2", 1, 2));
gridColumnModel.addHeaderGroup(0, 6, new HeaderGroupConfig("group3", 1, 3));
should be


gridColumnModel.addHeaderGroup(0, 0, new HeaderGroupConfig("group1", 1, 5));
gridColumnModel.addHeaderGroup(0, 5, new HeaderGroupConfig("group2", 1, 2));
gridColumnModel.addHeaderGroup(0, 7, new HeaderGroupConfig("group3", 1, 2));

fother
25 Jun 2009, 10:02 AM
this code



gridColumnModel.addHeaderGroup(0, 0, new HeaderGroupConfig("group1", 1, 5));
gridColumnModel.addHeaderGroup(0, 5, new HeaderGroupConfig("group2", 1, 2));
gridColumnModel.addHeaderGroup(0, 7, new HeaderGroupConfig("group3", 1, 2));


I'm was using in m-3 and was working fine.. but in rc1 broken

darrellmeyer
25 Jun 2009, 12:46 PM
This now works:


gridColumnModel.addHeaderGroup(0, 0, new HeaderGroupConfig("group1", 1, 5));
gridColumnModel.addHeaderGroup(0, 5, new HeaderGroupConfig("group2", 1, 2));
gridColumnModel.addHeaderGroup(0, 7, new HeaderGroupConfig("group3", 1, 2));Fixed in SVN.

fother
25 Jun 2009, 3:49 PM
great :D

souihli
26 Apr 2010, 2:22 AM
Hi,
I have the same problem. Can u please tell me where i can find the solution? (fixed in SVN ?? what's SVN link?)
Thanks in advance,

micgala
26 Apr 2010, 5:04 AM
This is very old.
It was fixed and it was released already.

What gxt version do you use?

You may try to create a new topic in the help forum, possibly providing a piece of your code.
If you guess this is a gxt bug, you can submit a new bug, and provide a full working case.