jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: UpdateRow Commit Problem UpdateRow Commit Problem #85933

    edd
    Participant

    Can anybody help me to with what i need to write to get on server the add edit reset row ?

    updaterow: function (rowid, rowdata, commit) {
    //synchroniza with the server – send update command
    data = “update=true” +
    “&ID_CUSTOMERS=” + rowdata.ID_CUSTOMERS +
    “&CompanyName=” + rowdata.CompanyName +
    “&ContactTitle=” + rowdata.ContactTitle +
    “&City=” + rowdata.City +
    “&Country=” + rowdata.Country +
    “&Address=” + rowdata.Address +
    “&DateOfBirth=” + rowdata.DateOfBirth;
    //rowdata.id = rowid;

    $.ajax({
    dataType: ‘json’,
    //cache: false,
    url: ‘WebService1.asmx/GetCustomers’,
    data: rowdata,
    type: “POST”,
    success: function (data, status, xhr) {
    // update command is executed.
    commit(true);
    //commit(true, data.id);
    alert(‘Worked!’);
    },
    error: function (jqXHR, textStatus, errorThrown) {
    // update failed.
    commit(false);
    alert(‘Did not work’);
    commit(true);
    }
    });

    },
    addrow : function (rowid, rowdata) {
    var observableArray = self.myData.arrayA,
    record = null;
    observableArray.push({ dateFrom: null, dateTo: null, duration: null, text: null, code: null, currency: null });
    record = observableArray()[rowid];
    for (var obj in record) {
    record[obj] = ko.observable(record[obj]);
    }
    ko.mapping.fromJS(observableArray(), {}, self.myData.arrayA());
    }

    deleterow : function (rowid) {
    var observableArray = self.myData.arrayA;
    observableArray.remove(observableArray()[rowid]);
    }

    I need to write anything else on default.aspx.cs to can see on the server sql?

Viewing 1 post (of 1 total)