DevExpress XtraGrid Selecting Only Cell on Row Click

When clicking a row in DevExpress XtraGrid, the following steps must be taken to select only the cell that cursor is on.

  • 1 - "Run Designer" opens.
  • 2 - Select "Views" from the left panel.
  • 3 - Select "CellFocus" from the "FocusRectStyle" property on the right panel.

An example of setting it as code is given below..


this.myListGridView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.CellFocus; 

Note : If you do not make the selected row color "Transparent", functionally the cell will still be selected. But you may not understand it visually.



You May Interest

Freezing a DevExpress XtraGrid Column

Demonstration of DevExpress XtraGrid Search Panel

DevExpress XtraGrid Setting Cell Color by Column

DevExpress XtraGrid Cell Text Settings by Column

Setting DevExpress XtraGrid Row Height