Problem with MouseLeftButtonUp event in RadTreeViewItem.

2 posts, 0 answers
  1. SivaPrasad Bevara
    SivaPrasad Bevara avatar
    73 posts
    Member since:
    Oct 2012

    Posted 16 Sep 2010 Link to this post


    I am facing the following problem with RadTreeViewItem's MouseLeftButtonUp event.

    I am using RadTreeView which has the RadTreeViewItems as below.




    TelerikNavigation:RadTreeView x:Name="Pages" Padding="5" VerticalAlignment="Top">     
    TelerikNavigation:RadTreeViewItem Header="Data" IsEnabled="True" 
    ="Data" MouseLeftButtonUp="NavigateButton_Click" IsExpanded="False"> 



            <TelerikNavigation:RadTreeView x:Name="SubData" IsExpandOnSingleClickEnabled="True">  


                <TelerikNavigation:RadTreeViewItem Header="Data1" IsEnabled="True" 
    ="Data1" MouseLeftButtonUp="NavigateButton_Click" IsExpanded="False" />  







    In the above RadTreeview(Pages) contains one RadTreeViewItem (Data), which in turn contains another RadTreeView(SubData) and its item (Data1). The NavigateButton_Click method is handled in the serverside based on the Tag value.

    In this when I click on the "Data1" item then it is calling the NavigateButton_Click method twise. one for (Data1) and another for its parent "Data".

    How can I stop calling its parent's MouseLeftButtonUp event when I click on the child Item.

    Please help.




  2. Miro Miroslavov
    Miro Miroslavov avatar
    588 posts

    Posted 17 Sep 2010 Link to this post

    Hello SivaPrasad Bevara,

     This is the normal behaviour, because the Child is actually part of the parent's TreeViewItem. However you can mark the event as Handled (e.Handled = true), thus the event won't be raised for the parent item.

    Kind regards,
    Miro Miroslavov
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top