Click and DblClick Events

3 posts, 0 answers
  1. Alexey Medvedev
    Alexey Medvedev avatar
    2 posts
    Member since:
    Sep 2009

    Posted 13 Nov 2009 Link to this post

    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. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 18 Nov 2009 Link to this post

    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.
  3. DevCraft banner
  4. Alexey Medvedev
    Alexey Medvedev avatar
    2 posts
    Member since:
    Sep 2009

    Posted 19 Nov 2009 Link to this post

    Thanks for solution Miroslav.

Back to Top