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

Click Not Firing when Icon Clicked

1 Answer 28 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 28 Nov 2013, 10:53 PM

This is possibly something I am overlooking but when I click the icon on a node the "nodeclicked" event does not fire but if i click the text it does.

The highlight moves to the correct node in both cases.

Also, if i click on the white space to the left of the icon, same behavior, no click event fires, but the highlight changes.

Any Help?

Kim

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 02 Dec 2013, 02:13 PM
Hello Kim,

Thank you for writing.

I can confirm that the NodeMouseClick event is not fired when you click the ImageElement or the LinesContainerElement. It is not fired because the default value of the ShouldHandleMouseInput property of the both elements is true. So to change this behavior you should set this property to false for example you can do that in the CreateNodeElement event handler:
void TreeViewElement_CreateNodeElement(object sender, CreateTreeNodeElementEventArgs e)
{
    e.NodeElement = new TreeNodeElement();
  
    e.NodeElement.ImageElement.ShouldHandleMouseInput = false;
    e.NodeElement.LinesContainerElement.ShouldHandleMouseInput = false;
}

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Treeview
Asked by
Kim
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or