Hello,
I am trying to use radRating control with a Lightswitch application.
I am using it within a DataGrid for which the columns are generated on the fly.
One of these columns has to be a Rating Control column.
To achieve this I've done a simple POC
Here is what I've tried.
XAML on my User Control
<UserControl>
<UserControl.Resources>
<!--<local:DateTimeConverter x:Key="DateConverter" />-->
<DataTemplate x:Key="myCellTemplate">
<rate:RadRating x:Name="myRatingControl"/>
</DataTemplate>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<telerik:RadGridView Name="radGridView1" AutoGenerateColumns="False"></telerik:RadGridView>
</Grid>
</UserControl>
C# code
Binding bind = new Binding();
bind.Path = new System.Windows.PropertyPath("childClass");
bind.Converter = new FeedbackValueConverters();
bind.ConverterParameter = i;
bind.Mode = BindingMode.TwoWay;
dg.Columns.Add(new GridViewDataColumn
{
Header = header,
IsReadOnly = true,
CellTemplate= (DataTemplate)dgAttendance.Resources["myCellTemplate"],
CellEditTemplate = (DataTemplate)dgAttendance.Resources["myTextBoxCellTemplate"],
DataMemberBinding = bind
});
With this I do see the columns generated with rating control but When I make changes to the value of any of these rating controls, Convert Back () method of value converter is not being called??
Is there something that is missing because of which the UI is not firing the event where the change has to be captured back in code?
Any help is appreciated.
Thanks & Reagrds
Supreet
I am trying to use radRating control with a Lightswitch application.
I am using it within a DataGrid for which the columns are generated on the fly.
One of these columns has to be a Rating Control column.
To achieve this I've done a simple POC
Here is what I've tried.
XAML on my User Control
<UserControl>
<UserControl.Resources>
<!--<local:DateTimeConverter x:Key="DateConverter" />-->
<DataTemplate x:Key="myCellTemplate">
<rate:RadRating x:Name="myRatingControl"/>
</DataTemplate>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<telerik:RadGridView Name="radGridView1" AutoGenerateColumns="False"></telerik:RadGridView>
</Grid>
</UserControl>
C# code
Binding bind = new Binding();
bind.Path = new System.Windows.PropertyPath("childClass");
bind.Converter = new FeedbackValueConverters();
bind.ConverterParameter = i;
bind.Mode = BindingMode.TwoWay;
dg.Columns.Add(new GridViewDataColumn
{
Header = header,
IsReadOnly = true,
CellTemplate= (DataTemplate)dgAttendance.Resources["myCellTemplate"],
CellEditTemplate = (DataTemplate)dgAttendance.Resources["myTextBoxCellTemplate"],
DataMemberBinding = bind
});
With this I do see the columns generated with rating control but When I make changes to the value of any of these rating controls, Convert Back () method of value converter is not being called??
Is there something that is missing because of which the UI is not firing the event where the change has to be captured back in code?
Any help is appreciated.
Thanks & Reagrds
Supreet