Reputation: 333
We are working on WPF project with MVVM architecture. And we are using XamGrid. We have bound a Data Table in xamGrid Item source. I want to perform sorting programmatically on the column of the xamGid on the basis of column value. We are using following code to sort the column:
if (xamGrid != null)
{
if (associatedColumn != null)
{
xamGrid.SortingSettings.SortedColumns.Clear();
xamGrid.SortingSettings.SortingSettings.SortedColumns.Add(Column);
xamGrid.SortingSettings.SortingSettings.FirstSortDirection = SortDirection.Descending;
}
}
I need some other standard way to sort in XamGrid.
Upvotes: 0
Views: 519