Permalink
Browse files

Updated example3 to include adding new items.

  • Loading branch information...
1 parent 4505a94 commit e256bc9d4e74753493f6774f2b38480f52183394 @mleibman mleibman committed Nov 5, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 examples/example3-editing.html
@@ -72,7 +72,7 @@
var options = {
editable: true,
- enableAddRow: false,
+ enableAddRow: true,
enableCellNavigation: true,
asyncEditorLoading: false
};
@@ -95,6 +95,13 @@
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>

0 comments on commit e256bc9

Please sign in to comment.