# Datagrid Formating

**URL:** <https://forum.radzen.com/t/datagrid-formating/5550>\
**Category:** Blazor Server\
**Created:** [November 9, 2020, 11:01am UTC](https://forum.radzen.com/t/datagrid-formating/5550 "2020-11-09T11:01:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnmu](https://forum.radzen.com/letter_avatar_proxy/v4/letter/j/b9bd4f/32.png) [@johnmu](https://forum.radzen.com/u/johnmu)\
**Post date:** [November 9, 2020, 11:01am UTC](https://forum.radzen.com/t/datagrid-formating/5550/1 "2020-11-09T11:01:43Z")

</div>

I have a datagrid with a calculated column (Total) and I can not get the format to work. The source column format (Cost) does honour the format. I have both set to {0:n}

What am i missing?

 ![image](https://forum.radzen.com/uploads/default/original/2X/f/fcb7a37721aeef0cbe6213a00cdb91eb3384ef84.png)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 9, 2020, 1:00pm UTC](https://forum.radzen.com/t/datagrid-formating/5550/2 "2020-11-09T13:00:12Z")

</div>

> [@johnmu](#):
>
> calculated column (Total)

What's the type of the value in this column? Decimal? Double?

---

<div class="post-metadata">

**Author:** ![johnmu](https://forum.radzen.com/letter_avatar_proxy/v4/letter/j/b9bd4f/32.png) [@johnmu](https://forum.radzen.com/u/johnmu)\
**Post date:** [November 9, 2020, 1:57pm UTC](https://forum.radzen.com/t/datagrid-formating/5550/3 "2020-11-09T13:57:46Z")

</div>

The value in this column is Double

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 9, 2020, 2:00pm UTC](https://forum.radzen.com/t/datagrid-formating/5550/4 "2020-11-09T14:00:49Z")

</div>

If this column is using a Template then the FormatString property will not be taken under consideration as the Template overrides it. You should manually format the number via the ToString method.

---

<div class="post-metadata">

**Author:** ![johnmu](https://forum.radzen.com/letter_avatar_proxy/v4/letter/j/b9bd4f/32.png) [@johnmu](https://forum.radzen.com/u/johnmu)\
**Post date:** [November 9, 2020, 2:13pm UTC](https://forum.radzen.com/t/datagrid-formating/5550/5 "2020-11-09T14:13:59Z")

</div>

Yes of course, forgot that. Many thanks
