Hello,
I have a CubeGrid and ListGrid that are both linked to the one same DataSource.
When I call cubeGrid.addData(record), only the ListGrid visually shows changes.
The cubeGrid however doesn't seem to show any visual changes.
Hopefully the code snippet above are sufficient.
The outcome in picture:
I have a CubeGrid and ListGrid that are both linked to the one same DataSource.
When I call cubeGrid.addData(record), only the ListGrid visually shows changes.
The cubeGrid however doesn't seem to show any visual changes.
Code:
CubeGrid cubeGrid = new CubeGrid();
Vcm_datasourceDs vcmDS = new Vcm_datasourceDs();
if(SC.hasDrawing()) {
cubeGrid.setEnableCharting(true);
}
cubeGrid.setCanAdaptHeight(true);
cubeGrid.setCanAdaptWidth(true);
vcmDS.waitUntilDsReady2(50, new DSReadyCallback() {
@Override
public void execute() {
cubeGrid.setDataSource(vcmDS.getDataSource());
cubeGrid.setValueProperty("Value");
cubeGrid.setCellIdProperty("cellID");
cubeGrid.setRowFacets("Regions", "Products");
cubeGrid.setColumnFacets("Time");
cubeGrid.fetchData();
getThis().addMembers(cubeGrid);
}
});
Code:
//button that calls the addData(record) function
IButton btnAdd = new IButton("Add Data", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
// TODO Auto-generated method stub
if (cubeGrid != null)
{
RecordList rl = cubeGrid.getDataAsRecordList();
int iAutoValue = rl.getLength();
Record recordAdd = new Record();
recordAdd.setAttribute("Regions", "GASES");
recordAdd.setAttribute("Products", "O2");
recordAdd.setAttribute("Time", String.valueOf(++iAutoValue));
recordAdd.setAttribute("Value", String.valueOf(++iAutoValue));
cubeGrid.addData(recordAdd);
}
}
});
The outcome in picture:
Comment