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

Problem with MouseLeftButtonUp event in RadTreeViewItem.

1 Answer 30 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
SivaPrasad Bevara
Top achievements
Rank 1
SivaPrasad Bevara asked on 16 Sep 2010, 08:46 AM
Hi,

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" 
        Tag
="Data" MouseLeftButtonUp="NavigateButton_Click" IsExpanded="False"> 

 

 

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

 

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

 

            </TelerikNavigation:RadTreeView 

 

        </TelerikNavigation:RadTreeViewItem 

 

</TelerikNavigation:RadTreeView>

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.

Regards,
Siva   

 

 

1 Answer, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 17 Sep 2010, 12:57 PM
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
Tags
TreeView
Asked by
SivaPrasad Bevara
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or