protected override void OnMouseDown(DataGridViewCellMouseEventArgs e)
{
if (e.Location.X > this.InheritedStyle.Padding.Left)
{
base.OnMouseDown(e);
}
else
{
// Expand the node
//TODO: Calculate more precise location
TreeGridNode node = this.OwningNode;
if (node != null)
{
node._grid._inExpandCollapseMouseCapture = true;
if (node.IsExpanded)
node.Collapse();
else
node.Expand();
}
}
}