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

Property of type TimeSpan not updating

4 Answers 91 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 04 Dec 2012, 02:37 PM
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;
  }
}

4 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 18 Dec 2012, 01:50 PM
Is there no interest to investigate this bug or to explain it?
0
Ivan Ivanov
Telerik team
answered on 18 Dec 2012, 02:01 PM
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.

0
Daniel
Top achievements
Rank 1
answered on 18 Dec 2012, 02:07 PM
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?

 

 

0
Ivan Ivanov
Telerik team
answered on 21 Dec 2012, 02:37 PM
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.

Tags
PropertyGrid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Share this question
or