Format TimeSpan Column on Grid

Hi,

Our object has a property which is of type TimeSpan. Is there a way to display this formatted?

We've tried:
col.Field(p => p.Time)
.HeaderText("Time")
.Format("{0:t}")
.Add();

But this only results in:

[object Object]

Any suggestions or ideas as to how we can achieve this?

Thank you


3 Replies 1 reply marked as answer

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team July 15, 2020 03:20 PM UTC

Hi Malcolm, 

Thanks for contacting Syncfusion Support. 

Query#:- Our object has a property which is of type TimeSpan. Is there a way to display this formatted? 
 
Thanks for contacting Syncfusion Support. 

We have already discussed about “How to bind timespan value to Grid column” in our Syncfusion KnowledgeBase. 

Refer to the KB link:- 

Please get back to us if you need any further assistance. 

Regards, 
Farveen sulthana T 


Marked as answer

MV Malcolm van Staden July 15, 2020 05:59 PM UTC

Hi,

Thank you, I did not realise this was already covered in the KB.

This resolves our issue.




FS Farveen Sulthana Thameeztheen Basha Syncfusion Team July 16, 2020 07:06 AM UTC

Hi Malcolm, 

Thanks for your update. Please get back to us if you need any further assistance. We are happy to assist you. 

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon