Get changed rows only.
Is there a way to get the Json only of the rows that changed? For example:
- table.getData(false) gets ALL the rows
- table.getData(true) gets the selected rows
How about table.getModifiedData()
table.getJson(true) // for hightlighted cells table.getJson(false) // all cells
Thanks Paul. Actually I meant to return only modified rows not all rows nor highlighted rows. This is useful in case a table has, say few hundred rows, and the user modify data in two rows only. Upon submitting the form, I want to be able to identify only these two rows to write them back to the database. I think I can track that using metadata, however it will be awesome if JExcel make that available without extra coding on the developer side.
Lyassa, you should use an event such as onafterchanges for example. This events can help you to keep frontend and backend syncronized.
https://bossanova.uk/jspreadsheet/v4/examples/events, look it see. var selectionActive = function(instance, x1, y1, x2, y2, origin) { // console.log(y1,y2) console.log(table.getRowData(y1))//get active row datas (y1 is first:0),then mondify myTable.setRowData(y1, ['1',,'2',.....]); //myTable.setValue([string], [string], [bool]); only mondify cell var cellName1 = jspreadsheet.getColumnNameFromId([x1, y1]); var cellName2 = jspreadsheet.getColumnNameFromId([x2, y2]); $('#log').append('The selection from ' + cellName1 + ' to ' + cellName2 + ''); }