Handling ContextMenu with grid refresh

2 posts, 0 answers
  1. Michele
    Michele avatar
    426 posts
    Member since:
    Jun 2009

    Posted 21 Jan 2014 Link to this post

    Hello,
    I've been asked to integrate an exsisting component (a library the sends events about financial transaction) on a winfor application.
    That library sends as an event a List of Item that are bound to a radgridcolumn via bindinglist.

    Each time an event is fired I got this in my code

    bindingSource.DataSource = tmrC.ViewableData;

    I wish to keep the context menu open even if sometime the refresh rate of the data is quite rapid (1 sec or less) but as the Bindingsource is refreshed I got the contextmenu closed.

    I don't know under winform which is the best approach, can I have a concurrent queue to put the data from the list and then (in some way) to update the grid?
     Or what?

    Thanks in advance


  2. George
    Admin
    George avatar
    500 posts

    Posted 24 Jan 2014 Link to this post

    Hi Paolo,

    Thank you for writing.

    You cannot cancel the hiding of the ContextMenu when the grid refreshes completely. The best approach in this situation would be to update your existing binding list since the grid will automatically reflect the changes without hiding the ContextMenu.

    You can read about Binding to BindingList here.

    I hope this helps.

    Regards,
    George
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top