Property of type TimeSpan not updating

5 posts, 0 answers
  1. Daniel
    Daniel avatar
    23 posts
    Member since:
    May 2009

    Posted 04 Dec 2012 Link to this post

    Whats wrong with timespan properties? It is not editable in PropertyGrid, only one-way binding works.

    I created sample project to demonstrate the bug:
    https://skydrive.live.com/redir?resid=51A46BBA4E9EF07E!1225

    <telerik:RadPropertyGrid Item="{Binding SelectedItem, ElementName=lbxItems}">

    </telerik:RadPropertyGrid>


    public class Item
    {
      [Description("This property is never set from RadPropertyGrid. Why?")]
      public TimeSpan TimeSpanProperty
      {
        get;
        set;
      }
    }
  2. Daniel
    Daniel avatar
    23 posts
    Member since:
    May 2009

    Posted 18 Dec 2012 Link to this post

    Is there no interest to investigate this bug or to explain it?
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 18 Dec 2012 Link to this post

    Hello,

    TimeSpan is not one of the default editable types supported by RadPropertyGrid, so no specific editor is auto-generated. The generated TextBox serves only display purposes. You can implement your own logic in a DataTemplate and set it as an EditorTemplate for the underlying PropertyDefinition.

    Kind regards,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Daniel
    Daniel avatar
    23 posts
    Member since:
    May 2009

    Posted 18 Dec 2012 Link to this post

    Ok, thanks.

    but, just out of curiosity, why there isn't twoway binding in the textbox by default?

    Edit:
    In  AutoGeneratingPropertyDefinition the Binding is TwoWay. How it is possible, that it is not updating?

     

     

  6. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 21 Dec 2012 Link to this post

    Hi,

    We are aware of this behavior. We have planned to rework it with some of the future versions.

    Regards,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready