There are 4 Command* parameters in RadTreeViewItem: Command, CommandParameter, CommandTarget, and CommandExecutionTrigger. I wasn't able to find any documentation or samples on how they work or used. Would anyone please help me with this? Thanks.
I prepared a sample for you that shows a sample command that is bound to RadTreeViewItem`s Command property and it is invoked when the Item is clicked. The command I created is a custom command that implements the ICommand interface - CanExecute and Executed methods. The CommandExecutionTrigger is Enumeration with two elements: Click and DoubleClick and determines whether Command is invoked on mouse Click or mouse DoubleClick. The command parameter is object that can be passed in the Execute and CanExecute methods. The CommandTarget determines the object that the commnad is being executed on. For example you can use ApplicationCommands like Save Cut Copy and set particular TextBox in the CommandTarget.
All of the four properties could be bound cia ContainerBindings in the example provided. Let us know if you need further assistance on this.
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Any chance of getting this example in a VB.NET version?
An example of how to execute a command when a checkbox in a tree is checked/unchecked would have been nice. Preferably with a conmmandparameter saying which item that have been checked/unchecked..
answered on 17 Jun 2011, 12:05 PM
Hello Frank -,
You can use various converters for translating C# to VB like this one for example.
On the other hand, you can use the IsChecked property of the RadTreeViewItem and bind it to a boolean property in your ViewModel via ContainerBindings. Then , in the in the setter of the property in the ViewModel, you can invoke a specific method which is equivalent to using a Command and CommadParameter to show which item has been checked. Please let us know if this is suitable for you or if you need assistance in implementing it.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items