Hello Telerik team,
I have a treeview control defined as follows:
If I drag and drop an item which is checked and drop it anywhere else in the treeview the checked state is lost.
How do I keep the checked-state?
Am I missing something?
I also have a problem with data binding - How do I bind an object property to the checked state?
e.g. I have an object as follows:
I want to bind an ObservableCollection<ColumnName> to the treeview.
I already have bound the property "Name" to the treeview display name (with DisplayMemberPath = "Name"), but I also want to bind the property "IsSelected" (in a TwoWay-Mode) to the checked-state of the treeview item.
Do you know how to do this?
Thank you in advance for your time!
Greetings,
Stefan
I have a treeview control defined as follows:
<telerikNavigation:RadTreeView |
x:Name="scOptionsColumnsToShowDnD" MinHeight="50" |
BorderBrush="Black" |
BorderThickness="2" |
IsLineEnabled="False" |
IsOptionElementsEnabled="True" |
IsTriStateMode="True" |
IsEditable="False" |
HorizontalAlignment="Left" |
VerticalAlignment="Top" |
IsDragDropEnabled="True" |
IsDropPreviewLineEnabled="True" |
IsDragPreviewEnabled="True" |
ItemsOptionListType="CheckList" |
ItemsSource="{Binding}"> |
</telerikNavigation:RadTreeView> |
If I drag and drop an item which is checked and drop it anywhere else in the treeview the checked state is lost.
How do I keep the checked-state?
Am I missing something?
I also have a problem with data binding - How do I bind an object property to the checked state?
e.g. I have an object as follows:
public class ColumnName : INotifyPropertyChanged { |
private bool _isSelected = false; |
public bool IsSelected { |
get { return this._isSelected; } |
set { |
this._isSelected = value; |
if (this.PropertyChanged != null) { |
this.PropertyChanged(this, new PropertyChangedEventArgs("IsSelected")); |
} |
} |
} |
public string Name { get; set; } |
public event PropertyChangedEventHandler PropertyChanged; |
} |
I want to bind an ObservableCollection<ColumnName> to the treeview.
I already have bound the property "Name" to the treeview display name (with DisplayMemberPath = "Name"), but I also want to bind the property "IsSelected" (in a TwoWay-Mode) to the checked-state of the treeview item.
Do you know how to do this?
Thank you in advance for your time!
Greetings,
Stefan