This is a migrated thread and some comments may be shown as answers.

[Solved] How to change display of database values on RadGrid columns.

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kem Arda
Top achievements
Rank 1
Kem Arda asked on 19 Oct 2009, 02:12 PM
I have a RadGrid on which resides a GridBoundColumn. And i display values of type decimal(10,4) on them. What i wantto to do is to display them as -for instance- 4.00 raher them 4.0000(since it field in tha table is decimal(10,4) the values are displayed as   4.0000 ). How can i do that?

Here is html of RadBoundGrid:  

 

<telerik:GridBoundColumn DataField="Yuzde" DataType="System.Decimal"   
            HeaderText="Yüzde" SortExpression="Yuzde" UniqueName="Yuzde" AllowFiltering = "false">  
         <ItemStyle Width="10px" ></ItemStyle>  
        </telerik:GridBoundColumn> 

I tried changind DataType="System.Decimal" to System.Double. It didn't work. 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 20 Oct 2009, 01:57 AM
Have you tried DataFormatString="{0:F2}"?
Tags
Grid
Asked by
Kem Arda
Top achievements
Rank 1
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or