Syncfusion.SfDataGrid.XForms
Example 

SortColumnsChanging Event

Occurs when the columns is being sorted in SfDataGrid.
Syntax
public event DataGridSortColumnsChangingEventHandler SortColumnsChanging
Event Data

The event handler receives an argument of type DataGridSortColumnsChangingEventArgs containing data related to this event. The following DataGridSortColumnsChangingEventArgs properties provide information specific to this event.

PropertyDescription
Gets the collection changed action i.e. whether an item is added, removed, replaced, reset or moved in the collection.  
Gets a list that contains the items that were sorted.  
Gets or sets a value indicating whether the event should be canceled. (Inherited from Syncfusion.XForms.Core.CancelEventArgs)
Gets a list that contains the items that were unsorted.  
Remarks
The user can cancel the sorting based on the columns being sorted by using this event.
Example
dataGrid.SortColumnsChanging += DataGrid_SortColumnsChanging;
            
void DataGrid_SortColumnsChanging (object sender, DataGridSortColumnsChangingEventArgs e)
{
//You can achieve your requirement here.
}
AssemblyVersion

Syncfusion.SfDataGrid.XForms: 17.1451.0.38

See Also