0
votes

I'm doing a WPF(MVVM) dashboard apparently DevEx controls (yet to decide) , before starting I want to get clarification on few questions.

Q1: For developing dashboard screen with a grid that displays some graphics which datagrid to choose, native WPF datagrid or any other 3rd prty like DevExpress controls ?

Q2: how to make datagrid refresh the data changes that are made at database side. I will get the data with datareader from model and bind it to grid. I don't want the user to worry about refreshing the screen by clicking button or some other control event, any changes made to data should be refreshed to the grid without user intervention. The changes made to the database by other external systems but not by the GUI of this application.

Thanks in advance

1

1 Answers

0
votes

In your model expose delegate or event, when ever value changes,your model will be knowing. so, in that case you can simply call that delegate or the event

In your ViewModel, have private method and hook that method to the delegate or the event of the model.

When ever Model invokes the delegate or event, that method that in the viewModel that is hooked will get called, in that method, you can again the query the database and update the property that is Binded to the View, which will automatically refresh the view(UI)