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

Column: DataFormatString combined with TargetNullValue

1 Answer 182 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tormod
Top achievements
Rank 2
Tormod asked on 16 Oct 2012, 01:30 PM
Hi. 

<telerik:GridViewDataColumn DataMemberBinding="{Binding ActVoltage,TargetNullValue=NA}" DataFormatString="0.###" Header="Actual Voltage"/>

Normal output is that I want this column to only show three decimals. However, when the underlying value is null, I want it to show the text "NA". 
It seems that I can't have both. When I included the formatstring, "NA" stopped showing up. I understand why, but not how to solve it.

The underlying type is nullable double.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 16 Oct 2012, 01:56 PM
Hello,

 With Q3 2012 which is expected to be released until the end of the week you could use the DisplayNullValue attribute to set this text.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Tormod
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Share this question
or