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
175
Select the first row in a grid by default
posted

 Does a property exist that makes the top most row in a grid selected whenever a grid is loaded or refreshed?

  • 469350
    Verified Answer
    Offline posted

    No, there's no property for this. The grid will never automatically select a row. But it does automatically keep the ActiveRow in synch with the data source. So if the first row in the grid appears selected and you don't want it to, you probably need to reset the grid.DisplayLayout.Override.ActiveRowAppearance and ActiveCellAppearance. 

  • 1612
    Offline posted
    You can add to Load / refresh event something like: if you want to select: this.ultGrid.Rows[0].Selected = true; or this.ultGrid.ActiveRow = this.ultGrid.Rows[0]; if you want to activate it