public void SortColumn(BvgColumn <TItem> parColumn) { if (parColumn.IsSorted) { parColumn.IsAscendingOrDescending = !parColumn.IsAscendingOrDescending; } else { foreach (var item in Columns.Where(x => x.IsSorted)) { item.IsSorted = false; item.InvokePropertyChanged(); } parColumn.IsSorted = true; parColumn.IsAscendingOrDescending = true; } parColumn.InvokePropertyChanged(); SortState = Tuple.Create(true, parColumn.prop.Name, parColumn.IsAscendingOrDescending); if (parColumn.IsAscendingOrDescending) { OnSort?.Invoke(parColumn.prop.Name); } else { OnSort?.Invoke(parColumn.prop.Name + " desc"); } }
public void SelectCell(BvgCell parCell, bool doFocus) { ActiveCell = parCell; ActiveRow = parCell.bvgRow; ActiveColumn = parCell.bvgColumn; SelectActiveRow(); SelectActiveCell(false); if (doFocus) { ActiveCellFocus(); } }
private void SelectColumn(BvgColumn <TItem> ActiveColumn) { Cmd_Clear_Selection(); ActiveColumn.IsSelected = true; ActiveColumn.CssClass = HeaderStyle.HeaderActive.ToString(); foreach (var item in Rows) { BvgCell <TItem> c = item.Cells.Single(x => x.bvgColumn.ID == ActiveColumn.ID); c.IsSelected = true; c.CssClassBase = CellStyle.CS.ToString(); c.InvokePropertyChanged(); } ActiveColumn.BSplitter.SetColor(bvgSettings.HeaderStyle.BackgroundColor); ActiveColumn.InvokePropertyChanged(); }