jQuery UI Widgets Forums Grid Globalization and loading gif

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  antonomase 11 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Globalization and loading gif #13430

    antonomase
    Participant

    Hi,

    Two questions :

    1) How to change the texts of the pager ‘Go to page’, ‘Show rows’, … under a grid ?

    2) I use JSON and Knockout to load datas into a grid (similar as the sample). But the animated gif (loader) is not displayed during the loading time ?Why ?

    On the server I have \jqwidgets-2.6 with all the js files and the subdirectories globalization, resources and styles

    Best regards

    Globalization and loading gif #13433

    Peter Stoev
    Keymaster

    Hi antonomase,

    1. For localization, see: jquery-grid-localization.htm.

    2. The Loading Gif is displayed when the Grid is bound to a dataAdapter and the dataAdapter calls the Ajax function. Otherwise, it will not be displayed.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Globalization and loading gif #13441

    antonomase
    Participant

    Hi Peter,

    Thanks for the firsts answer

    For the second one, my code is
    [code]
    $(document).ready(function () {
    var url = "lst.ajax.php";
    var GridModel = function () {
    this.items = ko.observableArray();
    var me = this;
    $.ajax({
    datatype: ‘json’,
    url: "lst.ajax.php"
    }).done(function (data) {
    var jsonData = $.parseJSON(data);
    me.items(jsonData);
    });
    }
    var model = new GridModel();

    var eta_source =
    { datatype: "observablearray",
    datafields: [{name: ‘NAME’}, {name: ‘ADDRESS’}],
    id: ‘ID’,
    localdata: model.items,
    pager: function (pagenum, pagesize, oldpagenum) {}
    };

    var eta_dataAdapter = new $.jqx.dataAdapter(eta_source);
    $("#eta_jqxgrid").jqxGrid(
    { width: ‘100%’, height: 560,
    source: eta_dataAdapter,
    sortable: true,
    pageable: true,
    pagesize: 20,
    autoheight: false,
    theme: theme,
    columns: [
    {text: ‘<b>Name</b>’, datafield: ‘NAME’},
    {text: ‘<b>Address</b>’, datafield: ‘ADDRESS’, width:200}
    ]
    });
    [/code]

    It is the same code as yours.

    Globalization and loading gif #13442

    Peter Stoev
    Keymaster

    Hi antonomase,

    In the code, the Ajax call is not made through the dataAdapter and the built-in loading image will not be displayed in that scenario.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Globalization and loading gif #13521

    antonomase
    Participant

    Thanks.

    I have changed the empdydatastring. It’s not the best way, but it works (the loading of data is quick enough)

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

You must be logged in to reply to this topic.