This is a migrated thread and some comments may be shown as answers.

Automatic refresh of gridview on edit

2 Answers 161 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ray
Top achievements
Rank 1
Ray asked on 28 Jul 2017, 02:38 PM

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 Answers, 1 is accepted

Sort by
0
Ray
Top achievements
Rank 1
answered on 28 Jul 2017, 04:45 PM

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

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

 

0
Ray
Top achievements
Rank 1
answered on 31 Jul 2017, 06:24 PM

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?

Tags
GridView
Asked by
Ray
Top achievements
Rank 1
Answers by
Ray
Top achievements
Rank 1
Share this question
or