BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Ari,
Thank you for contecting syncfusion support.
We have analyzed your query and we could not understand your requirement clearly. Could you please share more details regarding your requirement, like how you are expecting the sorting when we group the column in SfDataGrid? That would be more helpful for serve you better. But you can prevent the sorting when we group the column in SfDataGrid by using SfDataGrid.View.SortDescriptions.Clear method. Please refer the below code snippet.
public MainWindow() { InitializeComponent(); this.sfDataGrid.Loaded += sfDataGrid_Loaded; } void sfDataGrid_Loaded(object sender, RoutedEventArgs e) { var sortNotifyCollectionChanged = this.sfDataGrid.View.SortDescriptions as INotifyCollectionChanged; sortNotifyCollectionChanged.CollectionChanged += OnSortDescriptionsChanged; } private void OnSortDescriptionsChanged(object sender, NotifyCollectionChangedEventArgs e) { if (this.sfDataGrid.View.SortDescriptions.Count > 0 && this.sfDataGrid.GroupColumnDescriptions.Count>0) this.sfDataGrid.View.SortDescriptions.Clear(); } |
Sample location: http://www.syncfusion.com/downloads/support/forum/119506/ze/SimpleApplication_(2)1031239868
Please let us know if you require further assistance on this.
Thanks,
Ashok
Hi Ari,
We are sorry about the inconvenience caused.
We have analyzed your query and you can achieve your requirement by using custom sorting. We have prepared a sample by using custom soring and attached in the be below sample location, please refer it.
Sample location: http://www.syncfusion.com/downloads/support/forum/119506/ze/SimpleApplication-2003100714
Please refer to the following UG link to find more details on the custom sorting
UG link: http://help.syncfusion.com/ug/wpf/index.html#!Documents/customsorting.htm
Please let us know if you require further assistance on this.
Thanks,
Ashok