Calling CurrentItem or SelectedItem don’t raises the event SelectionChanged event

In SfTreeView when we call the function CurrentItem or SelectedItem is not suppose to raise the event SelectionChanged event?

Thanks & regards


1 Reply

LN Lakshmi Natarajan Syncfusion Team February 14, 2022 11:16 AM UTC

Hi Rui, 
 
The SelectionChanged and SelectionChanging events will be triggered only on UI interaction. When updating SelectedItem, the event will not be triggered with programmatic selection. 
 
Please refer to our user guidance document regarding the same, 
 
Additionally, the SelectedItems.CollectionChanged event will be triggered, when adding items to the SelectedItems collection. You can programmatically select more than one item by adding the underlying object to the SelectedItems property with SelectionMode as Multiple. 
 
Please refer to our user guidance document regarding SelectedItems, 
 
Please let us know if you need further assistance. 
 
Lakshmi Natarajan 
 


Loader.
Up arrow icon