jQWidgets Forums

jQuery UI Widgets Forums Grid jqxDataAdapter

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 6 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxDataAdapter #101781

    7cinquante
    Participant

    hello when i use jqxDataAdapter it send parameters
    filterscount: 0
    groupscount: 0
    pagenum: 0
    pagesize: 10
    recordstartindex: 0
    recordendindex: 12
    _: 1535728398372 for pagination in get request,
    i would like send any parameters only my url. there is a way to do it?

    thanks

    jqxDataAdapter #101791

    Martin
    Participant

    Hello 7cinquante,

    Yes, you can you the dataAdapter’s formatData function.
    It is a callback function which is called before the data is sent to the server. You can use it to fully override the data sent to the server. If you define a ‘formatData’ function, the result that the function returns will be sent to the server.
    For example:

    var source =
    {
        datatype: "jsonp",
        datafields: [
            { name: 'countryName', type: 'string' },
            { name: 'name', type: 'string' },
            { name: 'population', type: 'float' },
            { name: 'continentCode', type: 'string' }
        ],
        url: "http://ws.geonames.org/searchJSON"
    };
    var dataAdapter = new $.jqx.dataAdapter(source,
        {
            formatData: function (data) {
                $.extend(data, {
                    featureClass: "P",
                    style: "full",
                    maxRows: 50
                });
                return data;
            }
        }
    );

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.