SMART datagrid v.1 > Classes > GridDataSet

Back  Forward

DataLudi.GridDataSet.updateXmlRows  method

Except for transferring XML object to rows parameter, it is the same as updateRows

function updateXmlRows (row: Integer, rows: XMLList, start: Number, count: Number, checkDiff: Boolean, strictDiff: Boolean, checkEmpty: Boolean, rowEvents: Boolean);
Returns
Void
Parameters
row - Integer. required.
rows - XMLList. required.
start - Number. Defaults to 0.
count - Number. Defaults to -1.
checkDiff - Boolean. Defaults to false.
strictDiff - Boolean. Defaults to false.
checkEmpty - Boolean. Defaults to false.
rowEvents - Boolean. Defaults to false.
If it is true, confirmation and completion events will be fired in row unit. If it is DataSet.undoable, events in row unit will not be fired regardless of this property.
Code -1
    ds.onRowsUpdated = function (ds, row, count) {
        alert('It has been updated successfully.');
    };
    
    $('btnUpdate').click(function (ev) {
        var row = grid.focusedDataRow();
        if (row) {
            //
            var rows = '<rows><row id="1" userid="smccoy" company="Fivespan" first_name="Jane"/><row id="2" userid="smccoy" company="Fivespan" first_name="Jane"/></rows>';
            rows = DataLudi.parseXml(rows).documentElement.childNodes;
            ds.updateXmlRows(row.dataIndex(), rows, 0, 2, true, false);
        }
    });
See Also
appendXmlRows
insertXmlRows
setXmlRows
updateRows
onStatesChanged
onRowsUpdated
onStateChanged
onRowUpdated
updateRow
setValue
Examples
Row Updating