jQWidgets Forums

jQuery UI Widgets Forums Grid Grid dataSource

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Grid dataSource #6924

    jason
    Member

    HI, Can anyone suggest me how to user a ajax method to fill the datasource not the url .
    i get the data from serverside only one way is to invoke a mothed ,then the method callback return a json object ,
    i use the json object as grid datasource . i can’t use a url as the grid datasource directly , what can i do ver 2.3.1

    Grid dataSource #6925

    Peter Stoev
    Keymaster

    Hi jason,

    This sample populates the Grid from local JSON object: bindingtojsonstring.htm. Another sample for binding to local data is this one: bindingtoarray.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid dataSource #6930

    jason
    Member

    hi perter ,
    i can not populates the Grid in those ways ,there is one way i can do is using js method which can send a ajax request and have a callback method in the callback method i can get the data from serverside. I can use a javascript method not a url.

    Grid dataSource #6936

    Peter Stoev
    Keymaster

    The suggested samples as you can see in their code-behind are not loading data from url. The loaded data is local.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid dataSource #6937

    jason
    Member

    i know this ,but in my case ,it’s quite different from any other samples ,
    i have a javascript method like this

    CallWS({
    exec: “getorganizations”,
    organization_id: 0
    }, function (data) {
    $(“#txtResult”).val(JSON.stringify(data));
    });
    so i can not get data use a url or anything else.

    Grid dataSource #6939

    Peter Stoev
    Keymaster

    Ok, as far as I see you can load the Grid from the “data” param, if it is JSON data. If it isn’t convert it to JSON and load it from it.

    Here’s another sample: asp.net-web-service-grid.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.