2
我正在通過EditableGrid演示程序修改代碼來理解它,並使用write-to-db示例實現多個網格的工作示例。我是一名非程序員和vba黑客。多個mysql與EditableGrid鏈接的網格
在非db示例中創建多個網格非常簡單。然而試圖複製爲多個網格我想原型和這對象的代碼/結構可能會困惑我
多個網格沒有DB-LINK /直列編輯:
window.onload = function() {
editableGrid = new EditableGrid("DemoGridMinimal");
editableGrid.tableLoaded = function() { this.renderGrid("tablecontent", "testgrid"); };
editableGrid.loadXML("grid.xml");
editableGrid = new EditableGrid("DemoGridMinimal2");
editableGrid.tableLoaded = function() { this.renderGrid("tablecontent2", "testgrid"); };
editableGrid.loadXML("grid.xml");
}
單網格數據庫鏈接和在線編輯:(一點點從例如修改)
function DatabaseGrid() {
this.editableGrid = new EditableGrid("demo", {
enableSort: false,
tableLoaded: function() { datagrid.initializeGrid(this); },
modelChanged: function(rowIndex, columnIndex, oldValue, newValue, row) {
updateCellValue(this, rowIndex, columnIndex, oldValue, newValue, row);
}
});
this.fetchGrid();
}
DatabaseGrid.prototype.initializeGrid = function(grid) { grid.renderGrid("tablecontent", "testgrid"); };
DatabaseGrid.prototype.fetchGrid = function() { this.editableGrid.loadXML("loaddata.php"); };
window.onload = function() {
datagrid = new DatabaseGrid();
};
如果它可以幫助把整體背景下,最終的結果是有一個單一的幾個網格頁,填充單個SQL查詢,通過一個HTML形式輸入定義{佔SQL注入},與每個網格表示從分貝不同領域
可能有人是一種足以簡要解釋原型和此的上下文中在這裏的例子