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
580
Sortindicator being lost during repaint
posted

We have a grid that we use to display custom fields for a support ticket.  It is docked inside another form.  The grid has the column "label" sortindicator set as ascending.  it is the second column in the grid.  When the save data routine on the parent form is called and performs a refresh of the data, the sortindicator seems to be lost and the grid is ordered by the "optionid", which is the first column of the grid.  Optionid column is hidden.  This appears to have started happening only since we upgraded to version 10.1.  is there any issues with the grid in 10.1 that would cause this?

sortindicatorscreenshot.zip
Parents
  • 469350
    Offline posted

    Hi,

    btesch said:
    When the save data routine on the parent form is called and performs a refresh of the data

    My guess is that you are not just losing the sort indicator, but rather you are losing the entire layout of the grid. If you are setting the grid's DataSource or doing something that causes the DataSource to send a Reset notification, then the grid has to throw away everything and re-build the data structure and the rows based on the new data source.

    The best thing to do is avoid doing this. But if you must do it, then you should save the DisplayLayout of the grid into a MemoryStream and then re-load it after the refresh is complete.

Reply Children