Realtime sorting in RadDataGrid. Current status?

1 Answer 22 Views
GridView TreeView VirtualGrid
Bob
Top achievements
Rank 1
Bob asked on 08 Mar 2024, 05:47 AM

I've read this thread but it is a bit confusing and old: Live sorting/grouping in UI for WPF | Telerik Forums

What is the current situation?

I am having problems with Devexpress GridControl as they dont support what they call "Live Data Shaping" eg sorting with real-time updates IF you use WPF binding.

Question - can Telerik data grid and/or virtual grid do live data shaping where columns use custom templates with WPF binding to a dictionary. For example: `{Binding Fields[abc].Value}`?

1 Answer, 1 is accepted

Sort by
1
Accepted
Martin Ivanov
Telerik team
answered on 11 Mar 2024, 10:37 AM

Hello Bob,

The sorting/grouping/filtering data operations of RadGridView are applied over the property bound to the DataMemberBinding of the column and they work automatically on PropertyChanged. If you have other properties bound in the cell template, these won't be automatically taken into account during the data operations. You will need to update the value of the property bound to the DataMemberBinding.

If you need to use different properties for the different data operations, you can re-target the bound property, using the FilterMemberPath, SortMemberPath and GroupMemberPath properties of the column.

As an alternative approach you can implement custom filtering or custom sorting, but still you will need to manually re-bind the RadGridView whenever you change the values bound in the cell template.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Bob
Top achievements
Rank 1
commented on 11 Mar 2024, 01:04 PM | edited

the real question - does DataMemberBinding support indexed paths and would it work for automatic sorting (without custom template)?

{Binding Fields[abc].Value}

 

Martin Ivanov
Telerik team
commented on 11 Mar 2024, 03:12 PM

Yes, as long as the WPF data binding system supports it and the corresponding property raises the PropertyChanged event. The shown path is supported. However, if the Value property doesn't raise PropertyChanged the automatic sorting won't work. The PropertyChanged event comes from the INotifyPropertyChanged interface which is required in the WPF world in order to notify the UI for changes in the data model. If the Value property doesn't raise PropertyChanged the RadGridView control won't know that the corresponding value has changed.
Bob
Top achievements
Rank 1
commented on 11 Mar 2024, 03:27 PM

ok understood thank you! (sure Value raises even - or else the new value wont be visible in the UI anyway. sorting or no sorting :))
Tags
GridView TreeView VirtualGrid
Asked by
Bob
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or