This is a migrated thread and some comments may be shown as answers.

Item Added To Group Event?

2 Answers 58 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 16 Jun 2017, 01:11 PM

Hi,

I would trace in a RadTreeView the structure Groups/Items, wher Groups is first level and Items second one.

I thought that I could intercept "Item Added To Group event", can I do this in somehow?

Two cases I shuold keep:

  • I drag and drop 2 or more objects into RadDiagram, add theme both and create a group for theme.
  • I have already 2 or more objects into RadDiagram, user selects theme and clicks "Group Items" command.



2 Answers, 1 is accepted

Sort by
0
Dario Concilio
Top achievements
Rank 2
answered on 20 Jun 2017, 10:01 AM

I found it, when group is added, I attach ItemsChanged 

01.private void topRadDiagram_GroupsChanged(object sender, Telerik.Windows.Controls.Diagrams.DiagramItemsChangedEventArgs e)
02.{
03.    if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
04.    {
05.        //Ciclo sui gruppi aggiunti
06.        foreach (var item in e.NewItems)
07.        {
08.            var gruppo = (Group)item;
09. 
10.            gruppo.ItemsChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler((object sender2, System.Collections.Specialized.NotifyCollectionChangedEventArgs e2) =>
11.            {
12.                if (e2.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
13.                {
14.                [...]
0
Dinko | Tech Support Engineer
Telerik team
answered on 21 Jun 2017, 05:51 AM
Hi Dario,

We are happy to hear that you managed to find a solution for your case. If you have any further questions you can open a new thread with your question.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Diagram
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Dario Concilio
Top achievements
Rank 2
Dinko | Tech Support Engineer
Telerik team
Share this question
or