Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Row Activated on Loadup
posted

When I load a grid, the first row is highlighted.  I only want it to be highlighted or activated once I click on it.  Is there a way to deactivate this on load up but keep it when I do click on a row?

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

        The grid does not automatically activate a row. The grid's ActiveRow is synchronized with the current row of the CurrencyManager. So if the grid is showing up with an active row, it must be because the CurrencyManager is positioned to that row. 

        You can set SynchWithCurrencyManager to false on the grid and this will disable the synchronization. But keep in mind that if you do this, you can't rely on the CurrencyManager being in synch with the grid. This may not matter to you, depending on the needs of your application. 

        Another option might be to reset the grid.DisplayLayout.Override.ActiveRowAppearance and ActiveCellAppearance so that the ActiveRow doesn't appear highlighted. Then you can deal with Selected rows instead of the ActiveRow.  

Children