jQWidgets Forums

jQuery UI Widgets Forums Grid How to show the both statusbar and showaggregates at on same grid??

This topic contains 7 replies, has 3 voices, and was last updated by  Peter Stoev 7 years, 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Hello,

    Can anybody help me.

    How to show the both statusbar and showaggregates at on same grid??

    Thanks


    Peter Stoev
    Keymaster

    Hi pathikindianic,

    The Grid’s Aggregates are rendered in its Status Bar.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Thanks for you reply but

    when i enable both showaggregates and statusbar it will only showed aggregates not status bar. below is my code.

    $("#jqxgrid").jqxGrid(
    {
    width: '80%',
    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    pageable: true,
    autoheight: true,
    sortable: true,
    altrows: true,
    showaggregates: true,
    showstatusbar: true,
    renderstatusbar: function (statusbar) {
    // appends buttons to the status bar.
    var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
    var reloadButton = $("<div style='float: left; margin-left: 5px;'><span style='margin-left: 4px; position: relative; top: -3px;'>Reload</span></div>");
    var deleteButton = $("<div style='float: left; margin-left: 5px;'><span style='margin-left: 4px; position: relative; top: -3px;'>Delete</span></div>");
    var searchButton = $("<div style='float: left; margin-left: 5px;'><span style='margin-left: 4px; position: relative; top: -3px;'>Find</span></div>");
    container.append(deleteButton);
    container.append(reloadButton);
    container.append(searchButton);
    statusbar.append(container);
    deleteButton.jqxButton({ theme: theme, width: 65, height: 20 });
    reloadButton.jqxButton({ theme: theme, width: 65, height: 20 });
    searchButton.jqxButton({ theme: theme, width: 50, height: 20 });
    // reload grid data.
    reloadButton.click(function (event) {
    $("#jqxgrid").jqxGrid({ source: dataAdapter });
    });
    // delete selected row.
    deleteButton.click(function (event) {
    var selectedrowindex = $("#jqxgrid").jqxGrid('getselectedrowindex');
    var rowscount = $("#jqxgrid").jqxGrid('getdatainformation').rowscount;
    var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
    $("#jqxgrid").jqxGrid('deleterow', id);
    });
    // search for a record.
    searchButton.click(function (event) {
    var offset = $("#jqxgrid").offset();
    $("#jqxwindow").jqxWindow('open');
    $("#jqxwindow").jqxWindow('move', offset.left + 30, offset.top + 30);
    });
    },
    statusbarheight: 25,
    theme: theme,
    columns: [
    { text: 'Employee Number', datafield: 'employeeNumber', width: 100 },
    { text: 'First Name', datafield: 'firstName', width: 100 },
    { text: 'Last Name', datafield: 'lastName', width: 100 },
    { text: 'Extension', datafield: 'extension', width: 180 },
    { text: 'Email', datafield: 'email', width: 180 },
    { text: 'Office Code', datafield: 'officeCode', width: 100, aggregates: ['sum'] },
    { text: 'File Url', datafield: 'file_url', width: 140 }
    ]
    });

    Peter Stoev
    Keymaster

    Hi pathikindianic,

    That is what I wrote, too. The Grid’s Aggregates are rendered in the Status Bar. You can have either a custom Status Bar or Aggregates.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Ahh ok thanks i understand.

    But can you tell me how to create a custom Status Bar or Aggregates. or do you have any tutorial for the same.

    Thanks, appreciate you help


    Peter Stoev
    Keymaster

    Hi pathikindianic,

    You can add a DIV tag just below the Grid’s DIV tag and add the “jqx-widget”, “jqx-widget-header” and “jqx-widget-header-%theme name%” CSS classes. In that DIV tag you can add your custom Status Bar content.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    dan123
    Participant

    Hi can you show an example of this div tag below the Grid’s div tag. I really need to see one that would be helpful


    Peter Stoev
    Keymaster

    Hi dan123,

    Just add a DIV HTML tag below your Grid’s DIV tag with the same size as the Grid and put any type of content inside it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.