jQuery UI Widgets Forums Grid Jqxgrid aggregate

This topic contains 2 replies, has 2 voices, and was last updated by  sanjeev 9 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Jqxgrid aggregate #69288

    sanjeev
    Participant

    I have a jqxgrid in which i have datetime column to enter time duration.
    i want to display aggregate of duration in another format in aggregate column. but my jqxgrid aggregate row takes same cellformat and display error ‘Bad format specifier H’
    here is my code

    {
                                         text: '@Atom.Resources.Timesheet_Captions.C_36 ', datafield: 'Duration', width: 45, cellsformat: "HH:mm", columntype: 'datetimeinput', editable: true, createEditor: createDurationEditor, 
                                         aggregatesrenderer: 
                                         function (aggregatedValue, currentValue, column, record) {
                                             debugger;
                                             
                                             if (aggregatedValue == 0 || aggregatedValue=='00:00')
                                                 aggregatedValue = '00:00';
                                             else
                                                 aggregatedValue = aggregatedValue.getHours().padDigit() + ':' + aggregatedValue.getMinutes().padDigit();
                                             if (currentValue == null)
                                                 currentValue = '00:00';
                                             else
                                                 currentValue = currentValue.getHours().padDigit() + ':' + currentValue.getMinutes().padDigit();
    
                                             var time = timeSummation(aggregatedValue, currentValue);
                                             p = "1/1/1970 ";
                                             return new Date(p + time);
                                             return new Date();
                                         }
                                             
                                     },
    Jqxgrid aggregate #69305

    Dimitar
    Participant

    Hello sanjeev,

    Would you be able to reproduce this issue in a small JSFiddle example so that we may run your code and test it?

    Best Regards,
    Dimitar

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

    Jqxgrid aggregate #69321

    sanjeev
    Participant

    Sorry, there was some misunderstanding. I need only to implement customaggregate

    please find the jsfiddle in below link
    fiddle

    this fiddle will not give result because of cell formatting cellsformat: “HH:mm” in last column.
    if we remove cellsformat: “HH:mm” from jqxgrid, it will show aggregate value. that means aggregate row takes cell format. i need to display a string in aggregate cell

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

You must be logged in to reply to this topic.