I have my Order amount value is 89999.75, I wanted to display this value as 89,999.75 with TextBox in ItemTemplateIt is a decimal value in my database and dataobject.
How can I display the value in above format ? Thanks in advance for your help
Here is my xaml
<
ig:TemplateColumn Key="OrderAmount" HeaderText="Order Amount" HeaderTextHorizontalAlignment="Center" HorizontalContentAlignment="Right" MinimumWidth="184" IsSummable="False">
ig:TemplateColumn.ItemTemplate>
DataTemplate>
TextBox Text="{Binding OrderAmount, Mode=OneWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}"
</
ig:TemplateColumn>
Thanks & Regards
Sayap
Hi Sayap,
In this case you can use the StringFormat property of the binding itself. This feature was added in SL4. You can read more about it here - http://www.c-sharpcorner.com/UploadFile/dpatra/1142/.
Regards,
Thanks for repying back on this.
Can you please tell me how can I use FormatSting on this, here is my binding xaml? it does not have FormatSting property.
<TextBox Text="{Binding OrderAmount, Mode=OneWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}"
Set a FormatString on your binding:
http://msdn.microsoft.com/en-us/library/system.windows.forms.binding.formatstring.aspx
Devin