Closed capaaway closed 8 years ago
Hi, this is how it works for me:
somehow like that:
<!DOCTYPE html>
<html>
<head>
<title>Two Grids</title>
<script src="editablegrid.js"></script>
<script type="text/javascript">
var editableGrid1 = new window.EditableGrid("editableGrid1", {
editmode: "static"
// ...
});
editableGrid1.tableLoaded = function(){
this.renderGrid("grid1", "grid");
// ...
};
editableGrid1.modelChanged = function (rowIndex, columnIndex, oldValue, newValue, row) {
editableGrid1.saveChanges(row, rowIndex);
};
var editableGrid2 = new window.EditableGrid("editableGrid2", {
editmode: "static"
// ...
});
editableGrid2.tableLoaded = function(){
this.renderGrid("grid2", "grid");
// ...
};
editableGrid2.modelChanged = function (rowIndex, columnIndex, oldValue, newValue, row) {
editableGrid2 .saveChanges(row, rowIndex);
};
</script>
</head>
<body>
<h1>Grid 1</h1>
<div id="grid1"></div>
<h1>Grid 2</h1>
<div id="grid2></div>
</body>
</html>
Thanks! Fabio
Hi , coul someone help me to insert more than one editablegrid table in the same html page? The pourpose is to have 3 editable of the same table , filtered in 3 different ways . Thanks! Fabio