0
GoldenLayoutの通常のグリッドでSlickgridを使用できます。GoldenlayoutでのSlickgrid Dataviewの使用
しかし、私は、データビューを実装しようとしていると私はonRowCountChanged.subscribeイベントとのトラブルを抱えている:
var StockGridComponent = function (container, state) {
this._dataView = new Slick.Data.DataView();
this._container = container;
this._state = state;
this._grid = null;
this._columns = [...];
this._data = data;
container.on('open', this._createGrid, this);
};
StockGridComponent.prototype._createGrid = function() {
this._grid = new Slick.Grid(
this._container.getElement(),
this._dataView,
this._columns,
this._options
);
this._grid.setSelectionModel(new Slick.CellSelectionModel());
this._dataView.onRowCountChanged.subscribe(function (e, args) {
console.log(this); <-- return DataView
this._grid.updateRowCount(); <-- error: "Uncaught TypeError: Cannot read property 'updateRowCount' of undefined"
this._grid.render();
}
);
私は私の問題は、私は、オブジェクトの_gridに戻って参照する方法がわからないと思いオブジェクト(私はJavascriptに堪能ではない)。
SlickGrid DataviewでGoldenlayoutを使用している人は、SlickGridコンポーネントの作成方法を共有できますか?
ありがとうございます。
右、シンプルですっきりした、ありがとう! – jackofnone
ようこそ@jackofnone –