We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeCell Selection

Thread ID:





69737 Nov 9,2007 05:01 PM UTC Nov 9,2007 10:55 PM UTC WinForms 1
Tags: GridControl
Qingde Shi
Asked On November 9, 2007 05:01 PM UTC


In the Virtual TreeGrid example, How to enable selecting multiple cells starting from one of the TreeCells by holding mouse.



haneefm [Syncfusion]
Replied On November 9, 2007 10:55 PM UTC

Hi Q,

You need to override the TreeCellRenderer's OnHitTest and OnClick method to solve this issue in a VitrualTreeGridControl. Below are the codes that shows this task.

protected override int OnHitTest(int rowIndex, int colIndex, MouseEventArgs e, IMouseController controller)
if(e.Button != MouseButtons.None )
return GridHitTestContext.None ;
return 0 ;

protected override void OnClick(int rowIndex, int colIndex, System.Windows.Forms.MouseEventArgs e)
//if you call ClickTreeNode here instead of OnMouseDown,
//then the action is done later after the mouseup...
ClickTreeNode(rowIndex, colIndex, e);
base.OnClick(rowIndex, colIndex, e);

Here is a sample for reference.

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon