Hi there,
I'm trying to get the multiselection of the RadGridView working. I have a class Building with a Property IsSelected. With the Selection_Changed event i set/unset the property of the item. Is it possible to bind to the Building.IsSelected, so each row gets selected, if its object.IsSelected is true?
I know about the solution with behaviors, but I'd like one without it.
A little sample here:
<telerik:RadGridView x:Name="BuildingListGrid" ItemsSource="{Binding BuildingList}" EnableRowVirtualization="True"
SelectionUnit="FullRow" SelectionMode="Extended" SelectionChanged="MasterBuildingListGrid_OnSelectionChanged"> <telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Building.Name}" Header="Column2" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
public class Building : INotifyPropertyChanged
{
public Building(Building building){}
public bool IsSelected
{
get { return _isSelected; }
set
{
if (value == _isSelected) return;
_isSelected = value;
OnPropertyChanged();
}
}
public string Name { get; set; }
}