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

How do I reload data from the tables to the RadGridView?

2 Answers 137 Views
EntityFrameworkDataSource
This is a migrated thread and some comments may be shown as answers.
Sathyana
Top achievements
Rank 1
Sathyana asked on 13 Mar 2015, 05:18 PM

We are beginning to use Telerik WPF UI for a Windows Forms application.  We have a RadGridView bound to a RadEntityFrameworkDataSource which gets
data from the database using Entity Framework.  The data for the grid come from a View in the database.  The data appears fine initially but 
we change data in the tables programmatically.  How do we force the datagrid to retrieve the latest changes from the database? 

Thanks
Sathya

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 16 Mar 2015, 10:44 AM
Hello Sathyana,

You need to implement INotifyPropertyChanged interface. After that, once the value of a property is updated, RadGridView will be notified and the change will be reflected immediately in the view. 


Regards,
Maya
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Uwe
Top achievements
Rank 1
answered on 21 Mar 2017, 01:46 PM

Hello Sathyana,

we are also interested in such a mechanism. Where do you mean to implement the call of  OnPropertyChanged() ? Can you give a small example? We assigen a  MyRadEntityFrameworkDataSource.DbContext = new MyEntities() in the CodeBehind and how do we implement a good working try catch to prevent the Application for crashing on SQL Exceptions?

Thank you in advance and best Regard Uwe

Tags
EntityFrameworkDataSource
Asked by
Sathyana
Top achievements
Rank 1
Answers by
Maya
Telerik team
Uwe
Top achievements
Rank 1
Share this question
or