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

RadGridView GridViewDataColumn DataFormatString

4 Answers 263 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 17 Jan 2014, 11:20 AM
<telerik:GridViewDataColumn Header="Spanne Recommend" DataMemberBinding="{Binding Path=Spanne}" HeaderCellStyle="{StaticResource CommonInfoColumn}" ColumnGroupName="CommonGroup"  DataFormatString="{}{0:N2}">
Hello, 

I am using DataFormatString attrubute for decimal value formatting as in example.
In grid view i see value as 24.50 (with dot delimetr) . Value incorrect because in my Windows 7 setting actual point = , (comma);
Main problem: I want to copy values between cells in this field, but i can't. Then i pasted value "24.50", nothing happend.
All working then then i pasting "24,50", but i dont know how correct format value in XAML.

4 Answers, 1 is accepted

Sort by
0
Dmitry
Top achievements
Rank 1
answered on 17 Jan 2014, 12:34 PM
So... My TryStrory with DataFormatString:
Origival Value = 61.21 in nullable decimal

public decimal? Spanne
        {
            get { return SpanneRecommendItem.Spanne; }
            set
            {
                if (value == SpanneRecommendItem.Spanne)
                    return;
 
                SpanneRecommendItem.Spanne = value;
                OnPropertyChanged("Spanne");
            }
        }


{}{0:D2} - Empty Cell
{}{0:N2} - Value with dot-separator, can't copy between cells (61.21)
{}{0:P2} - Value with wrong separators, can't copy between cells 6,121.00 %
{}{0:F2} - Value with dot-separator, can't copy between cells (61.21)

I want recive - 61.21, what i am doing wrong?
0
Dmitry
Top achievements
Rank 1
answered on 17 Jan 2014, 12:53 PM
I like to talk to myself.

Then I set IsLocalizationLanguageRespected="False" and use {}{0:F2} - all right.
0
Vyacheslav
Top achievements
Rank 1
answered on 20 Jan 2014, 02:03 PM
Thanks, Dmitry!
I had the same question and your last post helped me.
0
Hristo
Telerik team
answered on 20 Jan 2014, 05:14 PM
Hello,

Thank you for sharing your solution. If you have any questions, don't hesitate to contact us.

Regards,
Hristo
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
General Discussions
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Dmitry
Top achievements
Rank 1
Vyacheslav
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or