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
345
WinGrid active/selected row in the 12,000s
posted

I anticipate, when opening a datagrid, to see the first row activated.  However, one of my grids defaults the active/selected row to a row in the 12,000s.  I have checked the code, and I cannot find anything that would dictate that. Is there an easy way to find out why?

Parents
No Data
Reply
  • 2575
    Offline posted

    Hello Daryl,

    My best guess for this scenario is that you are sorting your UltraGrid, and this sorting is being done outside of the InitializeLayout event and after the data is being bound. This would cause the UltraGrid to bind the data, initialize the layout, activate the first row, and then sort the rows. The active row would persist, but now it is being sorted far lower than the first row (in this case in the 12k range).

    The solution to this scenario would be to sort in the InitailizeLayout event. This is preferred anyway because your sorting will never be wiped out when you bind the grid to data.

    Otherwise, there may be something else setting the active row in your project. In that case, you're best bet is to start commenting code to isolate where the code is which is causing this active row to be set.

    Please let me know if my guess is right, and if I can assist you further.

Children
No Data