Closed abethcrane closed 8 years ago
Hm, try something like:
editableGrid.append(editableGrid.data.length, { 'Author': 'ME' }, true);
Maybe also the addRow() function applies for this purpose. I'm not quiet sure on this one yet..
Just to clarify, if no one has tried this yet, webMac has the correct answer.
editableGrid.append(editableGrid.data.length, { 'Author': 'ME' }, true);
This successfully created a new that was able to be edited for all my columns.
editableGrid.append(editableGrid.data.length+1, { 'Author': 'ME' }, true);
You need to skip to next row by adding +1 to the data length.
I can't find an example of appending, and the documentation isn't clear - http://www.editablegrid.net/documentation/symbols/EditableGrid.html#append - the arguments are listed as rowId, columns (as an integer?), dontSort, dontSort (twice?).
I keep getting errors like "ReferenceError: attrName is not defined" or "TypeError: Cannot read property 'visible' of undefined"
I'm trying things like: editableGrid.append(3, {"Author": "ME", "Title": "Your Mum"}, {}, true); So rowId: 3, some column info, no attributes and dontSort set to true.