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

looking for an event name

3 Answers 27 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
zalak m
Top achievements
Rank 1
zalak m asked on 11 Aug 2010, 07:47 PM
Hi,

I am looking for an event which displays the a new panel when there is a mouse move on the expanded treeviewitem.

Thanks,
Zalak

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 13 Aug 2010, 04:08 PM
Hello zalak m,

Can you elaborate on your issue a little bit more? Are you looking for expand on mouse move?

Regards,
Hristo Milyakov
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
0
zalak m
Top achievements
Rank 1
answered on 13 Aug 2010, 05:43 PM
Hi,

I want to first expand the first level of the RadTreeView and the want to capture the mousemove of the second level in the RadTreeView.

Thanks.
0
Hristo
Telerik team
answered on 18 Aug 2010, 05:00 PM
Hi zalak m,

You can attach an event handler to the MouseMove event of the data template content objects. Following code demonstrates what I mean:

<HierarchicalDataTemplate x:Key="PersonTemplate" ItemTemplate="{StaticResource TaskTemplate}"
        ItemsSource="{Binding Tasks}">
    <Border Background="Azure" Margin="0" Width="140" Height="20" MouseMove="Border_MouseMove">
        <StackPanel>
            <TextBlock Text="{Binding Name}" />
        </StackPanel>
    </Border>
</HierarchicalDataTemplate>

Lets say our tree is composed of 3 levels, where the first level are the Teams, second are the Members of that teams and third are the tasks for each person. You can register event handler to the content of the data template for the second tree level. In current example this is the MouseMove event of the Border element inside the HierarchicalDataTemplate "PersonTemplate".

If you don't know the structure of the tree in advance, probably you are going to need some mechanism to distinguish if the item is on second level or not.

Also, I'm attaching a working sample demonstrating how to programmatically expand tree item and how to handle the mouse move over second level items in the tree view.

Kind regards,
Hristo Milyakov
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
zalak m
Top achievements
Rank 1
Answers by
Hristo
Telerik team
zalak m
Top achievements
Rank 1
Share this question
or