private void OnSortChanged() { if (SortChanged != null) { SortChanged.Invoke(this, EventArgs.Empty); } }
protected virtual async Task OnSortChanged() { SortEventArgs args = new SortEventArgs(); args.ColumnName = Grid.Settings.SortSettings.ColumnName; args.Direction = Grid.Settings.SortSettings.Direction; if (SortChanged != null) { await SortChanged.Invoke(this, args); } }
private void OnHyperLinkClick(object sender, RoutedEventArgs e) { object new_sort_hyperlink = sender; if (sort_hyperlink == new_sort_hyperlink) { reverse_sort_direction = !reverse_sort_direction; } else { reverse_sort_direction = false; sort_hyperlink = new_sort_hyperlink; } SortChanged?.Invoke(); }
private void handleSortClick(HitInfo hitInfo) { FieldSortInfo sortInfo; if (!_sortIndexByField.TryGetValue(hitInfo.FieldName, out int sortIndex)) { sortIndex = -1; sortInfo = null; } else { sortInfo = _sortInfos[sortIndex]; } if (ModifierKeys == Keys.None) { _sortInfos.Clear(); _sortIndexByField.Clear(); if (sortInfo == null) { sortInfo = new FieldSortInfo(hitInfo.FieldName, SortOrder.Ascending); _sortInfos.Add(sortInfo); _sortIndexByField.Add(hitInfo.FieldName, _sortInfos.Count - 1); } else if (sortInfo.SortOrder == SortOrder.Ascending) { sortInfo.SortOrder = SortOrder.Descending; _sortInfos.Add(sortInfo); _sortIndexByField.Add(hitInfo.FieldName, _sortInfos.Count - 1); } updateSort(); SortChanged?.Invoke(this); } else if (ModifierKeys == Keys.Shift) { if (sortInfo == null) { sortInfo = new FieldSortInfo(hitInfo.FieldName, SortOrder.Ascending); _sortInfos.Add(sortInfo); _sortIndexByField.Add(hitInfo.FieldName, _sortInfos.Count - 1); } else if (sortInfo.SortOrder == SortOrder.Ascending) { sortInfo.SortOrder = SortOrder.Descending; } else if (sortInfo.SortOrder == SortOrder.Descending) { _sortInfos.RemoveAt(sortIndex); _sortIndexByField.Remove(hitInfo.FieldName); } updateSort(); SortChanged?.Invoke(this); } else if (ModifierKeys == Keys.Control) { if (sortInfo != null) { _sortInfos.RemoveAt(sortIndex); _sortIndexByField.Remove(hitInfo.FieldName); updateSort(); SortChanged?.Invoke(this); } } }
protected void OnSortChanged(QueryOption obj, bool added) { SortChanged?.Invoke(obj, added); }
public void Invalidate() { _sortedDocsByDefaultSort.Clear(); SortChanged?.Invoke(); }
public void Invalidate() { _sortedCards = null; SortChanged?.Invoke(); }