jQWidgets Forums

jQuery UI Widgets Forums Grid Passing argument to URL method,

This topic contains 1 reply, has 1 voice, and was last updated by  Keshavan 12 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Passing argument to URL method, #24296

    Keshavan
    Participant

    Hi,

    I need to pass an argument to the method in the URL, please provide me the syntax for the same, i have pasted my code below.

    My .net method in URL – GetCompaness expects an argument.

    var source1 =
    {
    datatype: "json",
    datafields: dataFields,
    data : gid,
    url: 'Company/GetCompanies',
    id: 'CompanyId',
    addrow: function (rowid, rowdata, position, commit) {
    // synchronize with the server - send insert command
    // rowdata.GroupCompanyId = gid;
    //datarow.CompanyId = (ctr + 1);
    $.ajax
    ({
    cache: false,
    dataType: 'json',
    url: 'Company/Add',
    data: rowdata,
    type: "POST",
    success: function (data, status, xhr) {
    // insert command is executed.
    commit(true);
    },
    error: function (jqXHR, textStatus, errorThrown) {
    alert("err" + errorThrown);
    commit(false);
    }
    });
    },

    Thanks,

    Keshavan

    Passing argument to URL method, #24308

    Keshavan
    Participant

    Hi,

    Please Ignore, i missed ? for the payload in URL.

    Thanks,

    Keshavan

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.