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 ;
}
else
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);
return;
}
Here is a sample for reference.
VirtualTreeSelectionModified.zipBest regards,
Haneef