Data formatting in DataGrid dynamic data

I use DataGrid dynamic data from witch datasource is a JSON from an API call.
I cannot format Decimal and DateTime data types.
I use like this:

Can you give me some advice?
Thank you in advance

You can use String.Format() similar to various examples in our demos.

When you use Template it will override the FormatString setting. Either remove the template or change it to use String.Format as @enchev suggested:

   @string.Format("{0:d}", context[column.Key])

Can you elaborate on "remove the template"? What would then replace it? Does this affect filter & sorting?

It means to remove the <Template></Template> tag altogether.

Not sure what you want to replace it with. My answer to this thread provides a solution already.

No. The template only affects the display of the data. Filtering and sorting works with the data.