Hi telerik,
I have the following rather simple use of the GridViewCheckBoxColumn -- and the grid shows up with no checkmarks what-so-ever.
Can you see what I'm doing wrong?
I can see (by breakpoint) that the row data model is queried for relevant value (so binding should be correct) and that the value in all cases is True (so the underlying value is as I expect).
Any clues?
Thanks,
Anders, Denmark
Grid
Row data item
I have the following rather simple use of the GridViewCheckBoxColumn -- and the grid shows up with no checkmarks what-so-ever.
Can you see what I'm doing wrong?
I can see (by breakpoint) that the row data model is queried for relevant value (so binding should be correct) and that the value in all cases is True (so the underlying value is as I expect).
Any clues?
Thanks,
Anders, Denmark
Grid
<Controls:RadGridView x:Name="grid"
AutoGenerateColumns="False"
ItemsSource="{Binding Items}"
Height="329"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ShowGroupPanel="False"
VerticalAlignment="Top"
IsFilteringAllowed="False"
>
<Controls:RadGridView.Columns>
<Controls:GridViewCheckBoxColumn DataMemberBinding="{Binding IsChecked}" IsThreeState="False" Initialized="GridViewCheckBoxColumn_Initialized" />
</Controls:RadGridView.Columns>
</Controls:RadGridView>
"Items"
ObservableCollection<
ICheckableViewModel
> Items {
get
;
set
; }
Row data item
public class CheckableStringViewModel : ICheckableViewModel
{
public CheckableStringViewModel(bool isChecked, string displayName, string identity, bool isReadOnly)
{
IsChecked = isChecked;
DisplayName = displayName;
Identity = identity;
IsReadOnly = isReadOnly;
}
public bool IsReadOnly { get; private set; }
public string DisplayName { get; private set; }
public string Identity { get; private set; }
private bool _isChecked;
public bool IsChecked
{
get { return _isChecked; }
set { _isChecked = value; }
}
}