jQuery UI Widgets › Forums › Grid › Jqxgrid aggregate
Tagged: aggregate, aggregates, date, datetime column, grid, hour, jqxgrid, time
This topic contains 2 replies, has 2 voices, and was last updated by sanjeev 9 years, 6 months ago.
-
AuthorJqxgrid aggregate Posts
-
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(); } },
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,
DimitarjQWidgets team
http://www.jqwidgets.com/Sorry, there was some misunderstanding. I need only to implement customaggregate
please find the jsfiddle in below link
fiddlethis 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 -
AuthorPosts
You must be logged in to reply to this topic.