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

Click and DblClick Events

2 Answers 65 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Alexey Medvedev
Top achievements
Rank 1
Alexey Medvedev asked on 13 Nov 2009, 05:05 PM
Hi. I tryed to play with new control.
All looks fine but where are Click and DblClick events ? 
It's very strange but i can't find tham....

Thanks.

2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 18 Nov 2009, 07:38 PM
Hello Alexey,

Thank you for trying out the TreeListView.

With the TreeListView you can register for the Click routed event like so:

this.AddHandler(Telerik.Windows.Controls.TreeList.ClickHelper.ClickEvent, new ClickEventHandler(OnClick), true);

Then in the handler you can check for the click count:

private void OnClick(object sender, ClickEventArgs e)
{
    if (e.ClickCount == 2)
    {
    }
}

Please note that the TreeList is still a CTP and this code may be subject to change.

Also to see the .AddHandler method you need to have the Telerik.Windows using.

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Alexey Medvedev
Top achievements
Rank 1
answered on 19 Nov 2009, 11:22 AM
Thanks for solution Miroslav.

Tags
TreeListView
Asked by
Alexey Medvedev
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Alexey Medvedev
Top achievements
Rank 1
Share this question
or