Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Advanced CubeGrid error : hide null cells on mousehover

$
0
0
Hi all,

When I'm trying to use CubeGrid (as the example http://www.smartclient.com/smartgwtee/showcase/#cube_analytics) with DataSource, my cubegrid isn't working correctly, i.e. when cells are null, they hides one by one on mouse hover!

I'm having also this warning :
Code:


com.smartgwt.client.core.JsObject$SGWT_WARN: 17:42:12.810:XRP2:WARN:CubeGrid:isc_CubeGrid_0:indexCellRecords() should be called to rebuild all the indices rather than manually calling addRecordsToIndex() on various cell data
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:745)


and this is my code I'm using to create the CubeGrid:
Code:

CubeGrid cubeGrid = new CubeGrid();
cubeGrid.setAutoFetchData(true);
cubeGrid.setDataSource(DataSource.get("mydata")); 

cubeGrid.setWidth100(); 
cubeGrid.setHeight100();
cubeGrid.setHideEmptyFacetValues(true); 
cubeGrid.setShowCellContextMenus(true); 
     
       
final NumberFormat numberFormat = NumberFormat.getFormat("0,000"); 
       
cubeGrid.setCellFormatter(new CellFormatter() { 
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) { 
                if (value == null) return "0.0"; 
                try { 
                    return numberFormat.format(((Number) value).longValue()); 
                } catch (Exception e) { 
                    return value.toString(); 
                } 
            } 
        });

cubeGrid.setCellIdProperty("id");
cubeGrid.setColumnFacets("data_unit_id");
cubeGrid.setRowFacets("account_id"); 
cubeGrid.setValueProperty("summary");


Please, could you help me to find the error, what I'm doing wrong?

Thanks in advance!

Version 4.1

Viewing all articles
Browse latest Browse all 4756

Trending Articles