Select checkbox in cell ... SelectionMode = GridSelectionMode.Row

May 23, 2012 at 1:27 PM

Hi

Great grid.

I have a checkbox control in the first cell in a row, but when I check the box I get an exception:

"Cell must have the focus"

I don't get this exception if the SelectionMode is GridSelectionMode.Cell, which I don't want to use because I want the whole row selected when they click any cell in that row.

Happy to provide any other details.

Does anyone know what to do?

 

SourceGrid.SourceGridException: Cell must have the focus   at SourceGrid.Cells.Editors.EditorBase.InternalStartEdit(CellContext cellContext)   at SourceGrid.CellContext.StartEdit()   at SourceGrid.Cells.Controllers.CheckBox.UIChangeChecked(CellContext sender, EventArgs e)   at SourceGrid.Cells.Controllers.CheckBox.OnClick(CellContext sender, EventArgs e)   at SourceGrid.Cells.Controllers.ControllerContainer.OnClick(CellContext sender, EventArgs e)   at SourceGrid.Cells.Controllers.CellEventDispatcher.OnClick(CellContext sender, EventArgs e)   at SourceGrid.Cells.Controllers.ControllerContainer.OnClick(CellContext sender, EventArgs e)   at SourceGrid.GridVirtual.OnMouseClick(MouseEventArgs e)