基于" get"的dgrid排序功能

时间:2016-07-11 11:43:18

标签: dojo dgrid

我的网格带有 private ICommand viewLoadedEventHandlerCommand; public ICommand ViewLoadedEventHandlerCommand { get { if (viewLoadedEventHandlerCommand == null) viewLoadedEventHandlerCommand = new RelayCommand(() => Debug.WriteLine("MainView was loaded.")); return viewLoadedEventHandlerCommand; } } 方法的列(一个可选函数,在给定数据项的情况下,将返回要在单元格中呈现的值)。我想使用此函数的值进行排序。这样做的正确方法是什么?

1 个答案:

答案 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.