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

[Solved] empy dataformatstring

3 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonam
Top achievements
Rank 1
Jonam asked on 21 Oct 2010, 10:59 PM
Hello,

i have a gridview with a column that displays a decimal. Is their a dataformat string that displays the column empty. If i use " " the column remains empty for positive values but for negatives values it still displays the "-" sign?

kind regards,

Jonam

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Oct 2010, 12:51 PM
Hi Jonam,

Basically, you can implement the IValueConverter Interface and create a converter return empty string no matter if the value is positive of negative. However, in order to provide with a more profound solution, I would need a bit more information about the expected behavior. Do you want to have empty values in that column only for particular items or for all of them ?

Greetings,
Maya
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
0
Jonam
Top achievements
Rank 1
answered on 24 Oct 2010, 09:10 PM
hello Maya,

the behaviour i want is very simple. No matter what the value is positive, negative or zero i want to display an empty colomn. The point of this is that the customer just wants the totals displayed. Can you supplied me with an example?

kind regards,

Jonam
0
Accepted
Maya
Telerik team
answered on 25 Oct 2010, 11:37 AM
Hi Jonam,

Following up your requirements, I have prepared a sample application demonstrating the usage of IValueConverter. You may find the project attached here.
 

All the best,
Maya
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
GridView
Asked by
Jonam
Top achievements
Rank 1
Answers by
Maya
Telerik team
Jonam
Top achievements
Rank 1
Share this question
or