top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to remove decimal using defaultcellvalue in datagrid?

+1 vote
68 views
How to remove decimal using defaultcellvalue in datagrid?
posted Sep 2, 2014 by Khusboo

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Supoose you want only two digits after decimal then create a datatemplate in Celltemplate of datagrid and set it's string formate property as follows

<TextBox Text="{Binding Property, StringFormat={}{F2},UpdateSourceTrigger=PropertyChanged}">

Suppose you want one digit after decimal then try F1 if zero then F0

Hope this helps.

answer Sep 2, 2014 by Salil Agrawal
Similar Questions
+2 votes

How to remove digits after decimal in vb.net?

if value is 1.9 i want 1
if value is 1.1 i want 1

+2 votes

How to remove decimal from currency datatype?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...