Php 可编辑网格&x2B;添加/删除mysql

Php 可编辑网格&x2B;添加/删除mysql,php,jquery,mysql,editablegrid,Php,Jquery,Mysql,Editablegrid,苏。。我得到了EditableGrid()的一个例子,这是一个非常酷的网格,它允许我通过排序、内联编辑和mysql数据库更新将数据从mysql表加载到html网格。我从另一个示例中添加了过滤功能,但我正在努力添加删除行和添加行功能 我找到了一个如何通过添加新列来删除的示例,我可以从中调用更新函数。。但我正在为语法和放置位置而挣扎。。到目前为止,javascript让我勃雷蒂感到困惑 输出加载到一个简单html文件中的div中,效果非常好。。又好又快,更新得很好。我只想在表中添加'new'和'de

苏。。我得到了EditableGrid()的一个例子,这是一个非常酷的网格,它允许我通过排序、内联编辑和mysql数据库更新将数据从mysql表加载到html网格。我从另一个示例中添加了过滤功能,但我正在努力添加删除行和添加行功能

我找到了一个如何通过添加新列来删除的示例,我可以从中调用更新函数。。但我正在为语法和放置位置而挣扎。。到目前为止,javascript让我勃雷蒂感到困惑

输出加载到一个简单html文件中的div中,效果非常好。。又好又快,更新得很好。我只想在表中添加'new'和'delete'函数

感谢您的帮助

function DatabaseGrid()
{
        this.editableGrid = new EditableGrid("plan_customerid", {
        enableSort: true,
        editmode: "absolute",
        editorzoneid: "edition",
        tableLoaded: function() {
          datagrid.initializeGrid(this);
        },
        modelChanged: function(rowIndex, columnIndex, oldValue, newValue, row) {
            updateCellValue(this, rowIndex, columnIndex, oldValue, newValue, row); },
        });
        this.fetchGrid();
}

DatabaseGrid.prototype.fetchGrid = function()  {
        // call a PHP script to get the data
        this.editableGrid.loadXML("loaddata.php");
};

DatabaseGrid.prototype.initializeGrid = function(grid) {
        grid.renderGrid("tablecontent", "testgrid", "tableid");
        tableRendered = function() { this.updatePaginator(); };
        _$('filter').onkeyup = function() { grid.filter(_$('filter').value); };
 };
loaddata.php的输出如下:

<table>
<metadata>
<column name="customer_id" label="UID" datatype="string" editable="true"></column>
<column name="customer" label="Customer" datatype="string" editable="true"></column>
<column name="lastchange_by" label="Editor" datatype="string" editable="true"></column>
<column name="ts" label="Timestamp" datatype="date" editable="true"></column>
</metadata>
<data>
<row id="1">
<column name="customer_id">
<![CDATA[ 5000 ]]>
</column>
<column name="customer">
<![CDATA[ Foo ]]>
</column>
<column name="lastchange_by">
<![CDATA[ Bar ]]>
</column>
<column name="ts">
<![CDATA[ 2013-10-17 00:00:00 ]]>
</column>
</row>
</data>
</table>