This is a WPF MVVM-light app.
A quick note: UserList
, used in the GetDefaultView
, is an ObservableCollection<T>
I have a collection view that is built like so:
private ICollectionView _iCollectionUserList { get; set; }
public ICollectionView ICollectionUserList
{
get
{
if (_iCollectionUserList == null)
{
_iCollectionUserList = CollectionViewSource.GetDefaultView(UserList);
_iCollectionUserList .SortDescriptions.Add(new SortDescription("StatusID", ListSortDirection.Ascending));
_iCollectionUserList .SortDescriptions.Add(new SortDescription("EmployeeNo", ListSortDirection.Ascending));
}
return _iCollectionUserList ;
}
}
It will sort by StatusID
, but it absolutely refuses to sort by EmployeeNo
. I cross referenced my query in SQL Server MGMTS with my app and it definitely is not working. I tried commenting out the StatusID
sort and that doesn't work either. Both are of type int
.