Clay,
Thanks for the quick response. I have tried yoru sample. What does GridCellActiviateAction do or not do? and what library is GetLookUpCode?
I teach programming classes. At the end of the sessions, I let the students try and stump me. Someone asked this. As I tried, I was bragging how easy controls make coding. I guess I should have researched a bit more.
Thanks Again,
Bill
>You would need to do this through PrepareViewStyleInfo.
>
>Try setting this property:
>
>this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.None;
>
>
>and handling these events.
>
>ArrayList doubleClickedCells = new ArrayList();
>private void gridDataBoundGrid1_DoubleClick(object sender, EventArgs e)
>{
> int row, col;
> Point pt = this.gridDataBoundGrid1.PointToClient(Cursor.Position);
> if(this.gridDataBoundGrid1.PointToRowCol(pt, out row, out col))
> {
> int code = GetLookUpCode(row, col);
> if(doubleClickedCells.IndexOf(code) == -1)
> doubleClickedCells.Add(code);
> else
> doubleClickedCells.Remove(code);
> this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Cell(row, col), true);
> }
>}
>private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
>{
> if(doubleClickedCells.IndexOf(GetLookUpCode(e.RowIndex, e.ColIndex)) > -1)
> {
> e.Style.BackColor = Color.Blue;
> }
>}
>
>