我可以使用这些代码向NatTable显示CSV内容:
IDataProvider bodyDataProvider = ...;
DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
viewportLayer.setRegionName(GridRegion.BODY);
natTable.setLayer(viewportLayer);
我们如何显示行号?我尝试使用GridLayer
,但没有列标题。请帮忙!
答案 0 :(得分:0)
我解决了这个问题。我使用try {
//your code that might cause an error to occur
}catch (e){
console.log("ERROR:" + e.toString());
}
:
CompositeLayer