Automatic refresh of gridview on edit

3 posts, 0 answers
  1. Ray
    Ray avatar
    3 posts
    Member since:
    Jul 2017

    Posted 28 Jul 2017 Link to this post

    Hi,

    I was having trouble putting together a proof of concept with your RadGridView. I have a sample solution .zip file but it won't let me attach it. How can I send that to you so you can easily see what I'm talking about? I am using BindingList but the grid does not auto-refresh the data. Basically, if you change the name of ESPN to ESPN2, I would like that to update everywhere ESPN is used without calling Refresh() on the GridViewTemplates. If you edit ESPN to ESPN2, then click the Refresh button and put a breakpoint, you can evaluate and see that the name has been changed everywhere in the underlying objects but the grid doesn't automatically update. I hope this is a simple fix. Thanks!

  2. Ray
    Ray avatar
    3 posts
    Member since:
    Jul 2017

    Posted 28 Jul 2017 in reply to Ray Link to this post

    Here is the example solution I made to easily see what I'm talking about. Thanks!

    http://www.palmettosystems.com/files/TestingTelerikWinFormsGridView.zip

     

  3. Ray
    Ray avatar
    3 posts
    Member since:
    Jul 2017

    Posted 31 Jul 2017 Link to this post

    Actually I saw in your documentation that I have to also implement INotifyPropertyChanged :http://docs.telerik.com/devtools/winforms/gridview/populating-with-data/reflecting-custom-object-changes-in-rgv

    Now it's partially working. Here is my sample solution: http://www.palmettosystems.com/files/TestingTelerikWinFormsGridView2.zip

    As you can see, when I click the "Change ESPN to ESPN2" button, it works perfectly and updates the grid without having to lose scroll position or refresh a gridviewtemplate. But... If I start the program over and this time edit the ESPN name in the grid to another name, it does not do the same thing. Is it because the Grid IsInEditMode? Is there a work-around for this or do you see me doing something wrong in my code?

Back to Top