This question is locked. New answers and comments are not allowed.
Hi Telerik,
I'm using the Q4 release and wondering if this was fixed or perhaps I'm doing something wrong. If I create a GridViewDataColumn with a checkbox in a cell template, the two way binding doesn't work coming back from my viewmodel properly. It notifies the grid I think, but you need to scroll or page back and forth to see the update of the checkbox. In other words, if I set IsSelected to true in my view model, it doesn't get reflected in the grid unless I scroll up and down or page back and forth. Then I see the refresh properly.
To better understand the issue
Here is my XAML:
I'm using the Q4 release and wondering if this was fixed or perhaps I'm doing something wrong. If I create a GridViewDataColumn with a checkbox in a cell template, the two way binding doesn't work coming back from my viewmodel properly. It notifies the grid I think, but you need to scroll or page back and forth to see the update of the checkbox. In other words, if I set IsSelected to true in my view model, it doesn't get reflected in the grid unless I scroll up and down or page back and forth. Then I see the refresh properly.
To better understand the issue
Here is my XAML:
<telerik:RadGridView Grid.Row="1" x:Name="SearchResultsGrid" ItemsSource="{Binding SearchResults}" FrozenColumnCount="2" AutoGenerateColumns="False" |
HeaderRowStyle="{StaticResource SearchHeaderRowStyle}" |
RowStyle="{StaticResource SearchNormalRowStyle}" |
AlternateRowStyle="{StaticResource SearchAlternatingRowStyle}" |
AlternationCount="2" |
RowIndicatorVisibility="Collapsed" |
MultipleSelect="True" SelectionChanged="OnRowSelected" |
><!--Background="{StaticResource GridViewRowNormalBackground}"--> |
<telerik:RadGridView.SortDescriptors> |
<telerikData:SortDescriptor Member="Schema.Name" |
SortDirection="Ascending" /> |
</telerik:RadGridView.SortDescriptors> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn x:Name="CheckBoxColumn" Header="+" DataMemberBinding="{Binding}" IsReadOnly="True" > |
<telerik:GridViewDataColumn.CellTemplate> |
<DataTemplate> |
<Border BorderThickness="1" BorderBrush="Gray" DataContext="{Binding}" > |
<CheckBox Style="{StaticResource CheckBox.Standard}" IsChecked="{Binding IsSelected, Mode=TwoWay}" /> |
</Border> |
</DataTemplate> |
</telerik:GridViewDataColumn.CellTemplate> |
</telerik:GridViewDataColumn> |
Here is my view model
private bool isSelected; |
public bool IsSelected |
{ |
get { return isSelected; } |
set { isSelected = value; |
PropertyChanged.Raise(this, "IsSelected"); |
} |
} |