We are working on a project that would require full rows to be selected and use of ctrl and shift. This is easy through
gridControl1.ListBoxSelectionMode = SelectionMode.MultiExtended;
However, we also only want to enter edit mode only if the user clicks on a currently selected row''s cell.
IE, the first click on a cell will select the entire row, the second click on the cell will make it editable.
Currently we have the grid set up as
gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent; Better option?
What is the proper strategy for accomplishing this?
ADAdministrator Syncfusion Team March 17, 2004 10:48 AM
I think you can do this by:
1) Adding member to your form:
2) in FormLoad:
this.grid.ActivateCurrentCellBehavior = GridCellActivateAction.None;
rangeList = this.grid.Selections.GetSelectedRows(false, true).Clone();
3) Handle the grid''s MouseUp eevnt and save the selections.
private void grid_MouseUp(object sender, MouseEventArgs e)
rangeList = this.grid.Selections.GetSelectedRows(true, false).Clone();
4) handle the grid''s MouseDown and start editing if the cell is in the saved selections.
private void grid_MouseDown(object sender, MouseEventArgs e)
int row, col;
if(rangeList.Count > 0 &&
this.grid.PointToRowCol(new Point(e.X, e.Y), out row, out col, -1))
ADAdministrator Syncfusion Team March 18, 2004 12:26 PM