Hello, What event gets fired when the node is being deleted? "ActiveNodeChanged" event doesnt help.
Thanks !!
Tania, Thanks for following up. Yes, your solution worked, but I didn't use it. I removed the feature it self.
But, I see this as a workaround. What If you bind a collection which is not an Observable Collection. I expect to see an event with necessary data.
Please mark it as verified answer.
Hi schinnasamy1 ,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
Thanks
Tania
Is it possible to miss the event ‘CollectionChanged’ which occurs from ObservableCollection<Order>() not from ObservableCollection<Customer>()?
Tania, Thanks for your response. But, the event is not getting fired when the underlying collection changes.
Below is my Xaml
<ig:XamDataTree ItemsSource="{Binding CustomerDataCollection, Mode=TwoWay}"> <ig:XamDataTree.GlobalNodeLayouts> <!--Header--> <ig:NodeLayout Key="ExisitingHeaderNameKey" TargetTypeName="Customer" DisplayMemberPath="FirstName" IsDraggable="False" IsDropTarget="False"> </ig:NodeLayout> <!--Mapping Name--> <ig:NodeLayout Key="ExisitingMappingNameKey" TargetTypeName="Order" DisplayMemberPath="OrderName" IsDraggable="False" IsDropTarget="True"> <ig:NodeLayout.EditingSettings> <ig:TreeEditingSettingsOverride AllowDeletion="True" AllowEditing="True" IsEnterKeyEditingEnabled="True" IsF2EditingEnabled="True" IsMouseActionEditingEnabled="DoubleClick" IsOnNodeActiveEditingEnabled="False" /> </ig:NodeLayout.EditingSettings> </ig:NodeLayout> </ig:XamDataTree.GlobalNodeLayouts> </ig:XamDataTree>
In the view Model:
public ObservableCollection<Customer> CustomerDataCollection { get; set; }
this.CustomerDataCollection = new ObservableCollection<Customer>() { ........ }
this.CustomerDataCollection = new ObservableCollection<Customer>()
{ ........ }
CustomerDataCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler( CustomerDataCollection_CollectionChanged);
Hi schinnasamy1,
For now The ‘XamDataTree’ doesn’t have ‘DeleteNode Event’. But in your case you can use ‘ObservableCollection’ and receive its event ‘CollectionChanged’ which occurs when an item is added, removed, changed, moved, or the entire list is refreshed.
I.e:
var data = new ObservableCollection<TreeNode>();
data.CollectionChanged += ContentCollectionChanged;
public void ContentCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { //...}