jQWidgets Forums

jQuery UI Widgets Forums Grid Add Button to Grid Header

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 11 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Add Button to Grid Header #46529

    Aung A. Win
    Participant

    Hello,
    I want to add a button to group header. When I click that button it call json data from url with the parameter value from that group header.

    Add Button to Grid Header #46564

    Dimitar
    Participant

    Hello Aung A. Win,

    You can achieve this with the groupcolumnrenderer callback function. Here is an example:

    var groupcolumnrenderer = function (text) {
        return '<button id="groupButton' + text + '">' + text + '</button>';
    }
    
    // Create jqxGrid
    $("#jqxgrid").jqxGrid(
    {
        width: 600,
        source: dataAdapter,
        groupable: true,
        theme: theme,
        groupcolumnrenderer: groupcolumnrenderer,
        columns: [
            { text: 'Company Name', datafield: 'CompanyName', width: 250 },
            { text: 'City', datafield: 'City', width: 120 },
            { text: 'Country', datafield: 'Country' }
        ],
        groups: ['City']
    });

    Best Regards,
    Dimitar

    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.