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

Databind PeogressBar example needed

1 Answer 236 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
Art Kedzierski
Top achievements
Rank 2
Art Kedzierski asked on 06 Apr 2010, 05:22 PM
Is it possible to databind the value of a RadProgressBar in XAML? For example:

<telerik:RadProgressBar  
     Name="PercentBar"  
     Orientation="Horizontal"  
     Margin="3"  
     Value="{Binding Path=My_Percent, StringFormat=P0}" /> 

Seems simple, but this particular code throws the following error:

System.InvalidOperationException was unhandled 
Message: A TwoWay or OneWayToSource binding cannot work on the read-only  
property 'My_Percent' of type 'System.Data.Common.DataRecordInternal'. 

There is no example in the current documentation for the control.

1 Answer, 1 is accepted

Sort by
0
Art Kedzierski
Top achievements
Rank 2
answered on 07 Apr 2010, 01:53 PM
Found the answer:

<telerik:RadProgressBar   
     Name="PercentBar"   
     Orientation="Horizontal"   
     Margin="3"   
     Value="{Binding Path=My_Percent, Mode=OneWay}" />  
Tags
ProgressBar
Asked by
Art Kedzierski
Top achievements
Rank 2
Answers by
Art Kedzierski
Top achievements
Rank 2
Share this question
or