private void radComboBoxRowPinPosition_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) { RadListDataItem radComboBoxRowPinPositionItem = this.radComboBoxRowPinPosition.SelectedItem as RadListDataItem; if (radComboBoxRowPinPositionItem == null) { return; } PinnedRowPosition rowPosition = (PinnedRowPosition)radComboBoxRowPinPositionItem.Value; RadListDataItem radComboBoxItem = this.radComboBoxSystemRows.SelectedItem as RadListDataItem; if (radComboBoxItem == null) { return; } GridViewSystemRowInfo systemRow = radComboBoxItem.Value as GridViewSystemRowInfo; if (systemRow != null) { systemRow.PinPosition = rowPosition; bool isNone = rowPosition == PinnedRowPosition.None; this.radLabelSystemRowPosition.Enabled = isNone; this.radComboBoxSystemRowPosition.Enabled = isNone; } }
public void SetPinPosition(int itemIndex, PinnedRowPosition position) { if (this.bottomPinnedItems.Contains(itemIndex)) { this.bottomPinnedItems.Remove(itemIndex); if (position == PinnedRowPosition.None) { this.OnPropertyChanged("BottomPinnedItems[]"); } } if (this.topPinnedItems.Contains(itemIndex)) { this.topPinnedItems.Remove(itemIndex); if (position == PinnedRowPosition.None) { this.OnPropertyChanged("TopPinnedItems[]"); } } if (position == PinnedRowPosition.Top) { this.topPinnedItems.Add(itemIndex); this.topPinnedItems.Sort(); this.OnPropertyChanged("TopPinnedItems[]"); } if (position != PinnedRowPosition.Bottom) { return; } this.bottomPinnedItems.Add(itemIndex); this.bottomPinnedItems.Sort(); this.OnPropertyChanged("BottomPinnedItems[]"); }
protected virtual void PinRow(PinnedRowPosition position) { if (this.MasterTemplate.MultiSelect) { foreach (GridViewRowInfo gridViewRowInfo in new List <GridViewRowInfo>(this.GetRowsForPin())) { gridViewRowInfo.PinPosition = position; } } else { this.RowInfo.PinPosition = position; } }
public ViewInfoEnumeratorPosition( GridViewInfo viewInfo, ViewInfoTraverser.Stages stage, ITraversable collection, int index, PinnedRowPosition pinPosition, SystemRowPosition rowPosition, PinnedRowPosition filteredPinPoisition, bool filterByPinPosition) { this.viewInfo = viewInfo; this.stage = stage; this.collection = collection; this.index = index; this.pinPosition = pinPosition; this.rowPosition = rowPosition; this.filteredPinPoisition = filteredPinPoisition; this.filterByPinPosition = filterByPinPosition; }
public void SetColumnPinPosition(int columnIndex, PinnedColumnPosition pinPosition) { int num; switch (pinPosition) { case PinnedColumnPosition.Left: num = 0; break; case PinnedColumnPosition.Right: num = 1; break; default: num = 2; break; } PinnedRowPosition position = (PinnedRowPosition)num; this.ColumnsViewState.SetPinPosition(columnIndex, position); }
public bool MoveToEnd() { this.stage = !this.filterByPinPosition || this.filteredPinPosition != PinnedRowPosition.Top ? (!this.filterByPinPosition || this.filteredPinPosition != PinnedRowPosition.None ? ViewInfoTraverser.Stages.BottomPinnedSystemRows : ViewInfoTraverser.Stages.BottomSystemRows) : ViewInfoTraverser.Stages.TopPinnedRows; this.SetCollectionForStage(); this.pinPosition = PinnedRowPosition.Bottom; this.rowPosition = SystemRowPosition.Bottom; do { ; }while (this.Collection.Count == 0 && this.ChangeCollectionBackward()); if (this.Collection.Count > 0) { this.index = this.Collection.Count - 1; this.current = (GridViewRowInfo)this.Collection[this.index]; if (!this.OnRowVisible()) { return(this.MovePrevious()); } return(true); } this.index = -1; this.current = (GridViewRowInfo)null; return(false); }
public void SetRowPinPosition(int rowIndex, PinnedRowPosition position) { this.RowsViewState.SetPinPosition(rowIndex, position); }
public void SetRowPinPosition(int rowIndex, PinnedRowPosition pinPosition) { this.ViewInfo.SetRowPinPosition(rowIndex, pinPosition); }
private void SetCollectionForStage(bool initializeCollection) { this.rowPosition = SystemRowPosition.Top; switch (this.stage) { case ViewInfoTraverser.Stages.TopPinnedSystemRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SystemRows; } this.pinPosition = PinnedRowPosition.Top; break; case ViewInfoTraverser.Stages.TopPinnedSummaryRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SummaryRows; } this.pinPosition = PinnedRowPosition.Top; break; case ViewInfoTraverser.Stages.TopPinnedRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.PinnedRows; } this.pinPosition = PinnedRowPosition.Top; break; case ViewInfoTraverser.Stages.TopSystemRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SystemRows; } this.pinPosition = PinnedRowPosition.None; this.rowPosition = SystemRowPosition.Top; break; case ViewInfoTraverser.Stages.TopSummaryRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SummaryRows; } this.pinPosition = PinnedRowPosition.None; this.rowPosition = SystemRowPosition.Top; break; case ViewInfoTraverser.Stages.ChildRows: if (initializeCollection && this.viewInfo.ParentRow != null) { this.collection = !this.viewInfo.ViewTemplate.IsSelfReference ? (ITraversable)this.viewInfo.ChildRows : (ITraversable)this.viewInfo.ParentRow.ChildRows; } else if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.ViewTemplate.ChildRows; } this.pinPosition = PinnedRowPosition.None; break; case ViewInfoTraverser.Stages.BottomSummaryRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SummaryRows; } this.pinPosition = PinnedRowPosition.None; this.rowPosition = SystemRowPosition.Bottom; break; case ViewInfoTraverser.Stages.BottomSystemRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SystemRows; } this.pinPosition = PinnedRowPosition.None; this.rowPosition = SystemRowPosition.Bottom; break; case ViewInfoTraverser.Stages.BottomPinnedRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.PinnedRows; } this.pinPosition = PinnedRowPosition.Bottom; break; case ViewInfoTraverser.Stages.BottomPinnedSummaryRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SummaryRows; } this.pinPosition = PinnedRowPosition.Bottom; break; case ViewInfoTraverser.Stages.BottomPinnedSystemRows: if (initializeCollection) { this.collection = (ITraversable)this.viewInfo.SystemRows; } this.pinPosition = PinnedRowPosition.Bottom; break; } }