Skip to content

Commit

Permalink
Updated example3 to include adding new items.
Browse files Browse the repository at this point in the history
  • Loading branch information
mleibman committed Nov 5, 2010
1 parent 4505a94 commit e256bc9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/example3-editing.html
Expand Up @@ -72,7 +72,7 @@ <h2>Options:</h2>

var options = {
editable: true,
enableAddRow: false,
enableAddRow: true,
enableCellNavigation: true,
asyncEditorLoading: false
};
Expand All @@ -95,6 +95,13 @@ <h2>Options:</h2>


grid = new Slick.Grid($("#myGrid"), data, columns, options);

grid.onAddNewRow = function(item,colDef) {
grid.removeRow(data.length);
data.push(item);
grid.updateRowCount();
grid.render();
}
})

</script>
Expand Down

0 comments on commit e256bc9

Please sign in to comment.