The OnHitTest returns a nonzero anytime the mouse is over one of the treecells. This means the selection mouse controller that manages selecting cells does not get a crack at selecting things. So, if you want to allow selections, you will have to refine teh OnHitTest to only return a nonzero when you do not want the selection controller to handle things. Below is a snippet that returns a non-zero only if the mouse is over the cell bitmap.
protected override int OnHitTest(int rowIndex, int colIndex, MouseEventArgs e, IMouseController controller)
{
if(e.Button != MouseButtons.None )
{
Rectangle rect = GetCellBoundsCore(rowIndex, colIndex);
int X = rect.X + IndentSize * (int)this.Grid.Model[rowIndex, colIndex].Tag;
rect.X = X;
rect.Width = this.bitmapWidth;
rect.Height = this.bitmapHeight;
if(rect.Contains(new Point(e.X, e.Y)))
{
return GridHitTestContext.Cell;
}
return 0;
}
}