Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1995
Summary for Time field
posted

Mike,

I am using Ultrawingrid and i have a column to get time value. For the time column, i am using the Style as "Time". I set the maskinput as "hh:mm:ss". The datatype of this column is string. 

For this column i need the summary. Is it possible to set summary for the time values? I tried to set the summary using summary row but it is not working. Guide me to get the summary for this time column.

 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The grid's built-in summaries will not work on a String field. The grid has no way to add strings together.

    You could use an ICustomSummaryCalculator and write your own code to convert the string into a date and perform the summary calculations yourself.

    My advice would be to use a DateTime or a TimeSpan data type for the column. Storing numeric or date values as string is generally not a good idea and will cause you all sorts of problems with sorting, filtering, and calculating.

Children