BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
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; } }
>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; > } >} > >
private int GetLookUpCode(int row, int col)
{
return 10000 * col + row;
}
>private int GetLookUpCode(int row, int col)
>{
> return 10000 * col + row;
>}
>