jQWidgets Forums

jQuery UI Widgets Forums Grid show wait element during grid navigation

This topic contains 6 replies, has 2 voices, and was last updated by  fabbiob 11 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author

  • fabbiob
    Participant

    Hello and thanks in advice

    I’m using version 3.0.4 , i’m having some trouble trying to show the wait element
    when i need it.

    What i need to to is to show the wait element just before data is changed in the grid, (navigation,filtering sorting…)
    and hide it just after the rendering is complete.

    Using the above grid/dataAdapter i’m not able to show the wait element on grid navigation.
    COuld you please tell me which are the right events to manage the operation?

    Fabio

    My dataadapter
    dataAdapter =
    new $.jqx.dataAdapter(
    source
    , {
    contentType: ‘application/json; charset=utf-8’
    , loadError: function (xhr, status, error) {
    alert(error);
    }
    , processData: function (data) {
    $(“#jqxgrid”).jqxGrid(‘showloadelement’);alert(“test 1”);
    }
    , beforeSend: function (data) {
    $(“#jqxgrid”).jqxGrid(‘showloadelement’);alert(“test 2”);
    }
    }

    );

    The grid definition is :
    $(“#jqxgrid”).jqxGrid({
    width: 980, height: 600, rowsheight: 20//, autoheight: true , filterable: true
    , source: dataAdapter
    , sorttogglestates: 1
    , rendergridrows: function (args) { return args.data; }
    , theme: ‘sfeblu’
    , columns: colsCliSet
    , columngroups: colsGroup
    , pagesize: 25
    , pagesizeoptions: [’25’, ’50’]
    , filterable: true
    , sortable: true
    , pageable: true
    , virtualmode: true
    , enablebrowserselection: true
    , enabletooltips: true
    , columnsresize: true
    , localization: getLocalization()
    , altrows: true
    , showsortcolumnbackground: false, showpinnedcolumnbackground: false
    , showfiltermenuitems: false, showfiltercolumnbackground: false
    , autoloadstate: false, autosavestate: false
    //, pagerrenderer: pRenderer
    , autoshowloadelement: false
    , ready: function (args) { alert(“test 3”);$(‘#jqxgrid’).jqxGrid(‘hideloadelement’); }
    , rendered: function(){ alert(“test 4”);$(‘#jqxgrid’).jqxGrid(‘hideloadelement’); }
    });


    Peter Stoev
    Keymaster

    Hi Fabio,

    AS you implement custom Loader, you’d better call “hideloadelement” in the “bindingcomplete” event handler – I suppose that you want to hide the “Loader” after the data is loaded.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    fabbiob
    Participant

    hi peter

    thanks for your answer

    just because we’re using ie7 the rendering is a bit slow, so we’re using the ready : on the grid to hide the load img.
    the real problema now i that when i navigate the grid, es: go to next page the loading element is not showing up
    and i don’t understant why.

    Fabio

    show wait element during grid navigation #47531

    Peter Stoev
    Keymaster

    Hi Fabio,

    That is what I am writing about, use “bindingComplete” to hide the load element so you will be sure that you hide it after the data binding is completed. “ready” is called once, “rendered” is called after each rendering operation like go to next page. “Loader” should be displayed when a binding operation starts and should be hidden when it is completed.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    show wait element during grid navigation #47532

    fabbiob
    Participant

    thanks peter

    ok for hiding the loading element.
    But i’m trying to display the loading block with no luck, wich event do i have to use to display the loading
    element?

    fabio

    show wait element during grid navigation #47533

    Peter Stoev
    Keymaster

    Hi Fabio,

    Please, try what I suggest and then write again. If you Hide the Loading element in the “rendered” callback just after you Show it. In addition, I do not think that the source object is created correctly. There is no “url” and there are no “datafields”.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    fabbiob
    Participant

    hi peter thanks for your help.

    I’ve done what you suggest plus a little workaround , our issue not grid related and now is working.

    don’t worry about the grid declaration, it’s not the complete code, i’ve removed columns definition

    datasource ecc, i thought they were not necessary.
    sorry if not.

    fabio

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

You must be logged in to reply to this topic.