Formatting Double Value
In wpf , how can I formatting datagridcolumns for double value by code behind?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
dinesh kumar64 reputationPosted Apr 22, 2015, 8:28 PM EDT
DTCol.Header = "xxyy";
DTCol.Binding = new Binding("xxyy");
DTCol.Bindgin.StringFormat = "{0:0.00}";
here you can use n number of double formats according to your requirement , here i have used two digit values.
check this for more MSDN format key words.
https://msdn.microsoft.com/en-us/library/dwhawy9k%28v=vs.110%29.aspx
If this helps please UPVote it.
Regards
DK