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

Displaying a negative value

3 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jeff alba
Top achievements
Rank 1
jeff alba asked on 22 Jun 2010, 02:15 PM
I cannot seem to be able to display a negative value in the grid.  Is there something simple I am missing?

The field type is a numeric field in Sql Server 2000.


What I currently have:
<telerik:GridBoundColumn HeaderText="Total Amount Due" DataField="TOTAL_AMOUNT_DUE" DataFormatString="{0:c}">
</telerik:GridBoundColumn>


3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Jun 2010, 02:54 PM
Hello Jeff,

You can use custom currency format to achieve this.

ASPX:
 <telerik:GridBoundColumn HeaderText="Total Amount Due" DataField="column1" DataFormatString="{0:$###,###.###}"
 </telerik:GridBoundColumn> 

Thanks,
Princy.
0
jeff alba
Top achievements
Rank 1
answered on 22 Jun 2010, 03:00 PM
Thanks for your reply.  Unfortunately that doesn't work.

I have also tried it in a GridNumericColumn and it does not show the value as negative. 

And yes, I am sure the value stored in the database is negative.

Any other suggestions?
0
Radoslav
Telerik team
answered on 25 Jun 2010, 02:09 PM
Hi Jeff,

Could you please verify that the type of the TOTAL_AMOUNT_DUE column from your database is set to int.

Looking forward for your reply.

All the best,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
jeff alba
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
jeff alba
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or