Disable DataGridView cell highlighting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrus

    Disable DataGridView cell highlighting

    I have Text box controls and DataGridView control in WinForms form.

    DataGridview contains custom ComboBox columns and standard TextBox columns.
    Edit mode is EditOnEnter.

    When focus is moved out of DataGridView, its current cell is displayed as
    selected state (blue background).

    How to remove this highlight so that selected cell is not highlighted at all
    (or highlighted only when grid is active control).

    Andrus.


  • RobinS

    #2
    Re: Disable DataGridView cell highlighting

    On the DefaultCellStyl e for the grid, set the SelectionBackCo lor to the same
    color as the BackColor for the cell.

    RobinS.

    "Andrus" <kobruleht2@hot .eewrote in message
    news:u5RiWFdjIH A.5660@TK2MSFTN GP02.phx.gbl...
    >I have Text box controls and DataGridView control in WinForms form.
    >
    DataGridview contains custom ComboBox columns and standard TextBox
    columns. Edit mode is EditOnEnter.
    >
    When focus is moved out of DataGridView, its current cell is displayed as
    selected state (blue background).
    >
    How to remove this highlight so that selected cell is not highlighted at
    all (or highlighted only when grid is active control).
    >
    Andrus.
    >

    Comment

    Working...