I have a C# devexpress project. I am using the checkbox for my project. Here is the screenshot of my design.
I want to click the "In Price" and "Out Price" cell, and select the rows (multiple. To be exact: I have a number of rows. If I click a cell, the cell will be selected, if I click another row cell, the first-row will still remain selected, and then the second one also be selected.)
Here is a demo of what I exactly expecting:

I am assuming that, because of the Toggle button, only if I click on the checkbox column, it is selected. If I need to turn it off, How can I do that?
If I need to write code what I am expecting, the code will be written:
private void gridView2_RowCellClick(object sender, RowCellClickEventArgs e)
{
if (e.Column.FieldName == "InPrice" || e.Column.FieldName == "OutPrice")
{
//Here I need to write the code.
}
}
private void gridView2_RowCellClick(object sender, RowCellClickEventArgs e)
{
if (e.Column.FieldName == "InPrice" || e.Column.FieldName == "OutPrice")
{
if ((Control.ModifierKeys & Keys.Control) != Keys.Control)
{
GridView view = sender as GridView;
GridHitInfo hi = view.CalcHitInfo(e.Location);
if(hi.InRowCell)
{
view.FocusedRowHandle = hi.RowHandle;
view.FocusedColumn = hi.Column;
view.ShowEditor();
CheckEdit edit = (view.ActiveEditor as CheckEdit);
if(edit != null)
{
edit.Toggle();
(e as DevExpress.Utils.DXMouseEventArgs).Handled = true;
}
}
}
}
}
This code works what I exactly wanted. If anyone need this, it may help you.