jQuery UI Widgets Forums Grid Aggregatesrenderer: Parameter count mismatch

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

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

  • hf
    Participant

    I would like to render some of the grid’s aggregates, but then get the error ‘Parameter count mismatch.’

    My code:

    
    { text: 'Hours', datafield: 'hours', cellsformat: 'n2', cellsalign: 'right', aggregates: ['min', 'max'],
                                aggregatesrenderer: function (aggregates, column, element) {
                                    var renderstring = "<div class='jqx-widget-content jqx-widget-content-" + theme + "' style='float: left; width: 100%; height: 100%; '>";
                                    $.each(aggregates, function (key, value) {
                                        var name = key == 'min' ? 'Min' : 'Max';
                                        var color = key == 'max' ? 'green' : 'red';
                                        renderstring += '<div style="color: ' + color + '; position: relative; margin: 6px; text-align: right; overflow: hidden;">' + name + ': ' + value + '</div>';
                                    });
                                    renderstring += "</div>";
                                    return renderstring;
                                }
                            },
    

    Dimitar
    Participant

    Hello hf,

    Your code is correct. I assume it is based on the demo Aggregates Renderer.

    Please provide us with a larger code sample. It is possible the issue originates in another part of your page.

    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.