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

Perform updates in batches

5 Answers 176 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Allan Elder
Top achievements
Rank 1
Allan Elder asked on 22 Mar 2012, 04:11 PM
Hi

Is there any way to perform updates in batches? E.g. I believe this was possible in the WinForms control via BeginUpdate / EndUpdate.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Mar 2012, 08:16 AM
Hello,

 Usually such behavior in WPF/Silverlight world where everything is MVVM should be implemented in your data model.

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Allan Elder
Top achievements
Rank 1
answered on 04 Apr 2012, 02:43 PM
If I give you the scenario we are reviewing your grid for, maybe that will help.

The application is a trading monitoring tool.

There are multiple views for different backend system, Each view is held in a tab. Each view contains multiple grids such as an sumamry view, orders, executions, etc, which are updated every second.

We already have a method of batching the updates to the data; we are using a BindingList<T> of POCO objects. Updates / deletes / adds to the binding list are processed internally and then applied to the UI when the batching thread wakes up.

DevExpress gives us the capability to to BeginDataUpdate / EndDataUpdate on their grid which improves the performence substantially given this scenario; is there no equivalent method or technique in your grid?
0
Vlad
Telerik team
answered on 04 Apr 2012, 02:45 PM
Hi,

I'm afraid that this is WInforms specific while RadGridView is a WPF component. 

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Allan Elder
Top achievements
Rank 1
answered on 04 Apr 2012, 02:54 PM
OK ... so given the scenario I described; what would be the most performant method of using your WPF grid? Just binding to the data source and letting the updates happen when the thread wakes up?
0
Vlad
Telerik team
answered on 04 Apr 2012, 02:59 PM
Hi,

 You can use a special collection to achieve your goal. We have for example RadObservableCollection<> and you can use SuspendNotifications() to suspend all notifications, perform desired changes in the collection and call ResumeNotifications() method which will raise CollectionChanged.Reset and the UI will react immediately. 

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Allan Elder
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Allan Elder
Top achievements
Rank 1
Share this question
or