jQWidgets Forums

jQuery UI Widgets Forums Grid Group Statusbar and Pager

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Group Statusbar and Pager #47243

    Makla
    Participant

    I am using custom pager outside grid. For that purpose I am calling this.Grid.jqxGrid('gotoprevpage'); and this.Grid.jqxGrid('gotonextpage');. Everything works.
    But I also use Statusbar. I don’t want to have 2 different divs at the bottom of the grid. I want to use 1 for both.

    I was thinking that I should use Statusbar and Grid.pagechanged event. The only problem is, that when I set pageable: false, the gotoprevpage and gotonextpage methods don’t work.
    So I say, no problem I set pageable: true, but I must figure it out, how to set height property of pager div to 0px.

    Would you suggest different approach?
    If no, how can I set pager div height to 0px?

    Group Statusbar and Pager #47244

    Makla
    Participant

    I just found pagerheight: 0. 🙂
    Now I just wonder if this is a good approach?

    Group Statusbar and Pager #47277

    Dimitar
    Participant

    Hello Makla,

    This is a suitable approach. Note that you may also need to set the pagerrenderer callback function to return an empty div, i.e.:

    var pagerrenderer = function () {
        return "<div></div>";
    };

    $("#jqxgrid").jqxGrid(
    {
    
        source: dataAdapter,
        columnsresize: true,
        width: 650,
        pageable: true,
        autoheight: true,
        pagerheight: 0,
        pagerrenderer: pagerrenderer,
        columns: [
            { text: 'First Name', dataField: 'firstname', width: 100 },
            { text: 'Last Name', dataField: 'lastname', width: 100 },
            { text: 'Product', dataField: 'productname', width: 170 },
            { text: 'Quantity', dataField: 'quantity', width: 80, cellsalign: 'right' },
            { text: 'Unit Price', dataField: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
            { text: 'Total', dataField: 'total', cellsalign: 'right', cellsformat: 'c2' }
        ]
    });

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.