RadGridView GridViewDataColumn DataFormatString

4 posts, 0 answers
  1. Dmitry
    Dmitry avatar
    3 posts
    Member since:
    Jan 2014

    Posted 17 Jan 2014 Link to this post

    <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.
  2. Dmitry
    Dmitry avatar
    3 posts
    Member since:
    Jan 2014

    Posted 17 Jan 2014 Link to this post

    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?
  3. DevCraft banner
  4. Dmitry
    Dmitry avatar
    3 posts
    Member since:
    Jan 2014

    Posted 17 Jan 2014 Link to this post

    I like to talk to myself.

    Then I set IsLocalizationLanguageRespected="False" and use {}{0:F2} - all right.
  5. Vyacheslav
    Vyacheslav avatar
    4 posts
    Member since:
    Sep 2013

    Posted 20 Jan 2014 Link to this post

    Thanks, Dmitry!
    I had the same question and your last post helped me.
Back to Top