Posted 14 September 2017, 11:12 am EST
Hi
I’m searching for a way to clear grid solution and I found this topic.
I did what Bernado said and it worked. The selection’s cleared.
But the selectionChanged event is not fired.
I try to fire the event myself but it’s not working
[js] grid.select(-1, -1);
var range = new wijmo.grid.CellRange();
var eventArgs = new wijmo.grid.CellRangeEventArgs(grid,range)
grid.onSelectionChanged(eventArgs);[/js]
And I got this error
[js]Assertion failed in Wijmo: function GridPanel(grid, cellType, rows, cols, element) {
this._offsetY = 0;
this._g = wijmo.asType(grid, _grid.FlexGrid);
this._ct = wijmo.asInt(cellType);
this._rows = wijmo.asType(rows, _grid.RowCollection);
this._cols = wijmo.asType(cols, _grid.ColumnCollection);
this._e = wijmo.asType(element, HTMLElement);
this._rng = new _grid.CellRange();
// dispatch blur event for focused cells before recycling the panel
if (!GridPanel._evtBlur) {
GridPanel._evtBlur = document.createEvent('HTMLEvents');
GridPanel._evtBlur.initEvent('blur', true, false);
}
} expected. undefined[/js]