An entire row of XtraGrid is highlighted, with the exception of a cell with a click

When I select a row in the next GridView, the cell that my mouse rests on (in other words, the cell that I left click on) to select the row is not highlighted until the rest of the cells in the row are all selected.

I would be grateful for your help.

GridView myView = (GridView)oGrid.MainView;
myView.OptionsSelection.MultiSelect = true;
myView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.RowSelect;

if (myView.RowCount > 0)
{
    frmChangeMyStatus ff = new frmChangeMyStatus(ccfrms);
    DialogResult dr = ff.ShowDialog();

    if (dr == DialogResult.OK)
    {
        for (int i = 0; i < myView.SelectedRowsCount; i++)
        {
            row = myView.GetSelectedRows()[i];
               //...........
        }
    }
}
+5
source share
2 answers

If you want the focused cell to look like any other cell in the focused row, turn off the focused cell style in the view properties. You can do this in two ways:

  • At runtime:

    myView.OptionsSelection.EnableAppearanceFocusedCell = false;

  • -: XtraGrid, Views:: ( ):: OptionsSelection:: Set EnableAppearanceFocusedCell to False.

XtraGrid, " ", .

+10

, , , ,

, , OptionsColumn.AllowEdit = false . , , , , , .

+1

All Articles