CellEditEnded event does not fire for child node of different type

5 posts, 0 answers
  1. Darlene
    Darlene avatar
    13 posts
    Member since:
    Jan 2012

    Posted 15 Feb 2012 Link to this post

    Hi,

    I'm trying to set up a relatively simple tree view.  It just so happens that I have two different data types as nodes in this tree view and that seems to cause some unexpected behaviour.  In another thread, it was determined that the background border wouldn't disappear if we moved off the cell.  In this thread, I note that the CellEditEnded event does not fire for child nodes.  Below is an outline of a solution that reproduces the problem.  Use the debugger to catch when CellEditEnded event fires.  Several other events seem to only also work on parent nodes.  How can I make these events fire for child nodes when they are also of a different type than the parent node?

    Thank you

    View:
    <telerik:RadTreeListView ItemsSource="{Binding ParentItems}" AutoGenerateColumns="False" ShowColumnHeaders="False" ShowGroupPanel="False" HorizontalGridLinesBrush="{x:Null}"
                                     RowIndicatorVisibility="Collapsed" AutoExpandItems="True" CellEditEnded="RadTreeListView_CellEditEnded" >
                <telerik:RadTreeListView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" />
                </telerik:RadTreeListView.Columns>
                <telerik:RadTreeListView.ChildTableDefinitions>
                    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
                </telerik:RadTreeListView.ChildTableDefinitions>
            </telerik:RadTreeListView>

    Code Behind:
    public MainPage()
            {
                InitializeComponent();
                this.DataContext = new Model();
            }
     
            private void RadTreeListView_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
            {
                // Insert breakpoint here
            }

    Model:

    public class Model
        {
            public RadObservableCollection<Parent> ParentItems { get; private set; }
     
            public Model()
            {
                ParentItems = new RadObservableCollection<Parent>();
     
                var parent1 = new Parent { Name = "Parent1" };
                parent1.Children.AddRange(new Child[] { new Child("Child1"), new Child("Child2"), new Child("Child3") });
                ParentItems.Add(parent1);
     
                var parent2 = new Parent { Name = "Parent2" };
                parent2.Children.AddRange(new Child[] { new Child("Child4"), new Child("Child5") });
                ParentItems.Add(parent2);
     
                var parent3 = new Parent { Name = "Parent3" };
                parent3.Children.AddRange(new Child[] { new Child("Child6") });
                ParentItems.Add(parent3);
            }
        }
     
        public class Parent
        {
            public string Name { get; set; }
            public RadObservableCollection<Child> Children { get; private set; }
     
            public Parent()
            {
                Children = new RadObservableCollection<Child>();
            }
        }
     
        public class Child
        {
            public string Name { get; set; }
     
            public Child(string name)
            {
                Name = name;
            }
        }
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 16 Feb 2012 Link to this post

    Hello,

     I have tested this functionality with the latest internal build and the event is fired for the child node as well. What version do you use?

    All the best,
    Didie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Darlene
    Darlene avatar
    13 posts
    Member since:
    Jan 2012

    Posted 16 Feb 2012 Link to this post

    Hi Didie!

    I'm using version 2011.3.1220.1040 or Q3 2011.
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 16 Feb 2012 Link to this post

    Hello,

     This confirms that the problem was resolved after the Service Pack was released. Please download the assemblies from the latest internal build and use them. 

    Greetings,
    Didie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Darlene
    Darlene avatar
    13 posts
    Member since:
    Jan 2012

    Posted 16 Feb 2012 Link to this post

    Yep, what impeccible timing.  Fixed in Q1 2012.  Thanks!!
Back to Top
DevCraft banner