ソートは、データソースレベルでCollectionViewクラスによって実行されます。 CollectionViewには配列である "sortDescriptors"プロパティがあります。あなたは好きなだけソートレベルを追加することができます。例:
// raw data
var data = [
{ state: 'NV', town: 'Las Vegas' },
{ state: 'NY', town: 'Saratoga' },
// ... more data ...
];
// CollectionView
var view = new wijmo.collections.CollectionView(data);
// sort by state, then by town
var sd = view.sortDescriptions;
sd.push(new wijmo.collections.SortDescription('state', true));
sd.push(new wijmo.collections.SortDescription('town', true));
これで、グリッドのデータソースとして「ビュー」オブジェクトを使用できます。
CollectionViewを使用しない場合、FlexGridは内部使用のために自動的に作成されるため、データなどをソートすることができます。この内部CollectionViewは、グリッドの「collectionView」プロパティを通じて公開されます。したがって、これを行うこともできます:
// bind grid to raw data (creates internal CollectionView automatically)
grid.itemsSource = data;
// sort the grid's CollectionView
var sd = grid.collectionView.sortDescriptions;
sd.push(new wijmo.collections.SortDescriptor('state', true));
sd.push(new wijmo.collections.SortDescriptor('town', true));
私はこれが役立ちます。
https://wijmo.com/5/docs/topic/wijmo.collections.CollectionView.Class.html
私はこれが役に立てば幸い:CollectionViewクラスの詳細については、こちらのリンクをご覧ください。