Here is code that will prevent selection changing when you click on the left side on the tree cell. But I do not know what you want dome when you close a node above the slection. This code will leave it at the row position in the grid. If you want teh same row to remain selected, then when the node is above teh selection you will have to adjust the selected row by th enumber of rows added or removed duting teh node operation.
private void gridControl1_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
if(e.Reason == GridSelectionReason.SetCurrentCell && Control.MouseButtons == MouseButtons.Left)
{
int row, col;
Point pt = this.gridControl1.PointToClient(Control.MousePosition);
if(this.gridControl1.PointToRowCol(pt, out row, out col, -1)
&& col == 1)
{
TreeCellRenderer cr = this.gridControl1.GetCellRenderer(row, col) as TreeCellRenderer;
Rectangle rect = cr.GetCellBoundsCore(row, col);
int X = 20 + rect.X + cr.IndentSize * (int)this.gridControl1[row, col].Tag;
if( pt.X < X)
e.Cancel = true;
}
}
}