I cannot see the first problem you discussed in the sample you attached using 2.0.5.1. What version are you using?
1) Remove the PrepareViewStyleInfo code and put it at the bottom of your CellDrawn event handler as an else clause on the if -statement you have handling the currentcell there.
else if(e.ColIndex > 0 && e.RowIndex > 0 &&
this.myGrid.Selections.Ranges.AnyRangeContains(GridRangeInfo.Cell(e.RowIndex, e.ColIndex)))
{
using(SolidBrush br = new
SolidBrush(Color.FromArgb(60, myGrid.AlphaBlendSelectionColor)) )
{
e.Graphics.FillRectangle(br, e.Bounds);
}
}
2) Chnage OnMouseDown to only set inColMove when you are strictly inside teh cell and not on the borderr.
int row;
if(this.PointToRowCol(mouseDownPt, out row, out sourceCol)
&& row == 0 && sourceCol > 0)
{
Rectangle rect = this.RangeInfoToRectangle(GridRangeInfo.Cell(row, sourceCol));
rect.Inflate(-3, 0);
if(rect.Contains(mouseDownPt))
{
Console.WriteLine("start move at {0}", sourceCol);
inColMove = true;
}
}
3) You could try saving grid.CurrentCell.RowIndex and grid.CurrentCell.COlindex before the grid gets refreshed with new data. Then Afterwards, use grid.CurrentCell.MoveTo(savedRow, saveCol) to reset the currentcell.