public class MyVariable : ViewModelBase, INotifyPropertyChanged{ public string Name { get; set; } public CellValue First { get; set; } public CellValue Second { get; set; } public CellValue Third { get; set; } public string Remarks { get; set; } public ObservableCollection<MyVariable> ChildCollection { get; set; } } public class CellValue : INotifyPropertyChanged { public string Key { get; set; } public double? Value { get; set; } public string Unit { get; set; } public string Location { get; set; } public bool IsEditable { get; set; } }<telerik:RadTreeListView x:Name="radTreeListView1" AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed" RowLoaded="radTreeListView1_RowLoaded" RowIsExpandedChanging="radTreeListView1_RowIsExpandedChanging"> <telerik:RadTreeListView.ChildTableDefinitions> <telerik:TreeListViewTableDefinition ItemsSource="{Binding ChildCollection}" /> </telerik:RadTreeListView.ChildTableDefinitions> <telerik:RadTreeListView.Columns> <telerik:GridViewDataColumn Header="Parameters" DataMemberBinding="{Binding Name}" IsReadOnly="True" Width="auto" /> <telerik:GridViewDataColumn Header="First Value" DataMemberBinding="{Binding First.Value, Mode=TwoWay}" DataFormatString="{Binding First.Unit, Converter={StaticResource numberConverter}}" IsReadOnlyBinding="{Binding First.IsEditable}" CellStyleSelector="{StaticResource cellStyle}" Width="auto" /> <telerik:GridViewDataColumn Header="Second Value" DataMemberBinding="{Binding Second.Value, Mode=TwoWay}" DataFormatString="{Binding Second.Unit, Converter={StaticResource numberConverter}}" IsReadOnlyBinding="{Binding Second.IsEditable}" CellStyleSelector="{StaticResource cellStyle}" Width="auto" /> <telerik:GridViewDataColumn Header="Third Value" DataMemberBinding="{Binding Third.Value, Mode=TwoWay}" DataFormatString="{Binding Third.Unit, Converter={StaticResource numberConverter}}" IsReadOnlyBinding="{Binding Third.IsEditable}" CellStyleSelector="{StaticResource cellStyle}" Width="auto" /> <telerik:GridViewDataColumn Header="Remarks" DataMemberBinding="{Binding Remarks}" IsReadOnly="True" Width="*" /> </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>public class NumberConverter : IValueConverter{ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { CellValue cellValue = value as CellValue; if (cellValue != null && cellValue.Unit == "%") { return "{0:p2}"; } else return "{0:n2}"; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; }}<telerik:GridViewDataColumn Header="First Value" DataMemberBinding="{Binding First.Value, Mode=TwoWay}" DataFormatString="{Binding First, Converter={StaticResource numberConverter}}" IsReadOnlyBinding="{Binding First.IsEditable}" CellStyleSelector="{StaticResource cellStyle}" Width="auto" />
<telerik:GridViewDataColumn Header="Second Value" DataMemberBinding="{Binding Second.Value, Mode=TwoWay}" DataFormatString="{Binding Second, Converter={StaticResource numberConverter}}" IsReadOnlyBinding="{Binding Second.IsEditable}" CellStyleSelector="{StaticResource cellStyle}" Width="auto" />
<telerik:GridViewDataColumn Header="Third Value" DataMemberBinding="{Binding Third.Value, Mode=TwoWay}" DataFormatString="{Binding Third, Converter={StaticResource numberConverter}}" IsReadOnlyBinding="{Binding Third.IsEditable}" CellStyleSelector="{StaticResource cellStyle}" Width="auto" />CellValue cellValue = value as CellValue; <
telerik:GridViewCheckBoxColumn MinWidth="60" Width=".5*" IsReadOnly="False" Header="Select" DataMemberBinding="{Binding CHARGEWAIVEDIND, UpdateSourceTrigger=PropertyChanged}" IsFilterable="False" />
The problem I am facing at the moment is that I'm unable to find the triggering event when user changes the value of the checkbox. Currently I am using GridView's CellEditEnded event which is not suitable for this as this event triggers only when user moves the cursor away from the checkbox column. Kindly help me out.
The QueryableDataServiceCollectionView seems have a dependency on System.Data.Services.Client v 4.0. The project is built agains WCF Data Services October 2011 CTP and references Microsoft.Data.Services.Client from CTP folder. I tried to trick it with binding redirect, but it didn't work.
My version of the controls is 2011.3.1220.35. What version of WCF Data Services is supported?
-Stan
