Steve Dyke
Steve Dyke

Reputation: 175

Set Background Color in jqGrid Footer Row

The following code will not change the background color.

function gComplete(){

        var $grid = $('#timesheetlineitemsqueue');
        var colSum = $grid.jqGrid('getCol', 'totals', false, 'sum');
        $grid.jqGrid('footerData', 'set', { 'totals': colSum });
        $grid.jqGrid('footerData', 'set', { 'day7': 'Total' });
        $grid.jqGrid('footerData', 'set', { background: 'red'});


    }

What am I doing wrong? How would I make this !important if that is the cause?

Upvotes: 0

Views: 2370

Answers (1)

Oleg
Oleg

Reputation: 221997

You can use the following CSS rule for example

.ui-jqgrid-sdiv .ui-jqgrid-ftable .footrow {
    background-color: red;
    background-image: none
}

The method footerData don't support any parameter which allow you to change the color dynamically.

Upvotes: 2

Related Questions