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.
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.
I changed the datatype as "datetime" but also the summary not coming. I attached a sample source for your reference.
At the load, i added the summary for the filed. If i enter time value, the summary will not display.
I have some coding in the "ugBalanceSheet_SummaryValueChanged" event, which calculate the value and post it in summary. Is there any simple way to work out this summary than my coding?