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
1800
Reset RowLayout
posted

Hi,

I have a wingrid that uses row layout and there is a thread that runs behind (Basically a timer). I'll refresh the data in the grid every 1000 msec. based on the thread. Since row layout is used, after couple of refreshes' the layout is going for a toss. How to reset the rowlayout.? Tried with ResetRowLayout, but in vain..I have this row layout in initializelayout event.

In simple words, i have to refresh the grid data being displayed. I have to hit the db and bind the values again.

Any help is appreciated.

Parents
  • 469350
    Suggested Answer
    Offline posted

    I'm not sure I understand your question.

    It sounds like maybe you need to save the DisplayLayout of the grid and then re-load it.

    But even if that works, it sounds like what you are doing is extremely dangerous. If you are modifying the data source that the grid is bound to on another thread, this will almost certainly cause problems. The grid is not multi-thread safe, nor is the BindingManager. The grid or the DotNet Bindingmanager could, at any time, ask for the value of a cell or some other property setting from the data source, and if that data source is in the middle of being modified on a different thread, it could cause your application to crash or your data to become corrupted. Not only will this almost certainly cause problems, the problem will be nrealy impossible to track down, since it will occur on a different thread.

Reply Children