jQWidgets Forums

jQuery UI Widgets Forums Grid Passing data to server using Ajax

This topic contains 2 replies, has 2 voices, and was last updated by  naatha 12 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Passing data to server using Ajax #18599

    naatha
    Member

    Hello,

    I am getting data to grid using the following code and it works fine:

    var source =
    {
    datatype: "json",
    type: 'GET',
    url: 'MyWebProject.aspx/GetJsonData',
    cache: false,
    datafields:
    [
    { name: 'Id', type: 'string' },
    { name: 'Title', type: 'string' },
    { name: 'FirstName', type: 'string' },
    { name: 'LastName', type: 'string' }
    ],
    };
    var dataAdapter = new $.jqx.dataAdapter(source, {
    contentType: "application/json; charset=utf-8",
    loadError: function (xhr, status, error) {
    alert(error);
    },
    downloadComplete: function (data, textStatus, jqXHR) {
    return data.d;
    }
    });

    Now i want to change my program like:

    from a drop down list, i can choose a number and the number has to be passed to the server. According to the number, server will send different data set and the grid will be filled by the data.

    Questions:

    1) How can i send data to server ?

    2) How can i bind the data to grid, when i select the number from the drop down list?

    Thanks

    Passing data to server using Ajax #18634

    Peter Stoev
    Keymaster

    Hi naatha,

    For sending data to a server, you may take a look at this help topic: jquery-grid-extra-http-variables.htm and this one asp.net-grid-paging-sorting-filtering.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Passing data to server using Ajax #18648

    naatha
    Member

    Thanks Peter

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

You must be logged in to reply to this topic.