我的网格带有 private ICommand viewLoadedEventHandlerCommand;
public ICommand ViewLoadedEventHandlerCommand
{
get
{
if (viewLoadedEventHandlerCommand == null)
viewLoadedEventHandlerCommand = new RelayCommand(() => Debug.WriteLine("MainView was loaded."));
return viewLoadedEventHandlerCommand;
}
}
方法的列(一个可选函数,在给定数据项的情况下,将返回要在单元格中呈现的值)。我想使用此函数的值进行排序。这样做的正确方法是什么?
答案 0 :(得分:0)
No, It is not possible. The sorting is done on the data in Store/Collection. whereas, the get method is related to the particular column of the grid and is called while rendering. Sorting is done before the rendering of grid.
You probably would want to add a new property to the data/store with the values in the get function. apply sort on that property.