Category / Section
How to track sorting changes in PivotGrid?
1 min read
The SortBegin and SortCompleted events can be raised before and after the sort action. These events can be raised in the sample application as required in order to track the changes made while sorting. Refer to the following code example to learn how to invoke those events.
C#
void GroupingBar_Loaded(object sender, RoutedEventArgs e) { this.pivotGrid1.SortBegin += pivotGrid1_SortBegin; this.pivotGrid1.SortCompleted += pivotGrid1_SortCompleted; } void pivotGrid1_SortBegin(object sender, OnSortActionStarted e) { } void pivotGrid1_SortCompleted(object sender, OnSortActionCompleted e) { }
VB
Private Sub GroupingBar_Loaded(sender As Object, e As RoutedEventArgs) AddHandler Me.pivotGrid1.SortBegin, AddressOf pivotGrid1_SortBegin AddHandler Me.pivotGrid1.SortCompleted, AddressOf pivotGrid1_SortCompleted End Sub Private Sub pivotGrid1_SortBegin(sender As Object, e As OnSortActionStarted) End Sub Private Sub pivotGrid1_SortCompleted(sender As Object, e As OnSortActionCompleted) End Sub