Posted 27 January 2019, 8:01 pm EST
Hi Team,
I am trying to add a row to my flexsheet using Insert Row method and assign the data model to the row’s dataItem with code as follows:
active_sheet.insertRows(selectedRow);
var newrow = //A custom row with some default values
let row = active_sheet.rows[selectedRow];
$.extend(row.dataItem, newrow)
This is based on your comments from the following post:
https://www.grapecity.com/en/forums/wijmo/flexsheet-sort-after-inser
In my case I am creating Flexsheet object using
new wjmo.grid.sheet.Flexsheet(#Id); and adding a bound sheet with observable array
as data source.
I have integrated the recent Wijmo build -wijmo-5.20183.567 into my solution and I’m facing the following issue:
I am formatting the sheet by painting its cells.So each time I add an new row,based on the new range I am calling the format function to paint the sheet using applycellsStyles method.This works fine the first time I add a row and Sort.The second time I again add a row and after sorting it loses the format and breaks. The sheet.evaluate function throws the below error:
‘Cannot read property ‘evaluate’ of undefined’
Code:
sheet.updatedView.addHandler(function (s, e) {
aggData = Enumerable.From(data).Select(“$.sheet.evaluate($.” + col.binding + “)”).Sum();
}
Can you please help me with this.
Thanks,
Keerthana