public bool ExpandRow(int rowIndex) { if (this.childViewInfos.ContainsKey(rowIndex) && this.childViewInfos[rowIndex].IsExpanded) { return(false); } VirtualGridViewInfo childViewInfo = this.GetChildViewInfo(rowIndex, true); VirtualGridRowExpandingEventArgs args = new VirtualGridRowExpandingEventArgs(rowIndex, childViewInfo, this); this.GridElement.OnRowExpanding(args); if (args.Cancel) { return(false); } if (!this.childViewInfos.ContainsKey(rowIndex)) { this.childViewInfos.Add(rowIndex, new VirtualGridViewInfo(this, rowIndex)); } this.childViewInfos[rowIndex].IsExpanded = true; int size = this.GridElement.UseScrollbarsInHierarchy ? this.childViewInfos[rowIndex].ExpandedHeight : this.childViewInfos[rowIndex].GetTotalRowHeight(); this.rowsViewState.SetExpandedSize(rowIndex, size); this.childViewInfos[rowIndex].ExpandedHeight = size; this.OnNotifyPropertyChanged("ExpandedRows[]"); this.GridElement.OnRowExpanded(new VirtualGridRowExpandedEventArgs(rowIndex, childViewInfo, this)); return(true); }
public VirtualGridViewInfo(VirtualGridViewInfo parentViewInfo, int parentRowIndex) { this.gridElement = parentViewInfo.gridElement; this.parentRowIndex = parentRowIndex; this.parentViewInfo = parentViewInfo; this.InitializeViewInfo(); }
public VirtualGridCellPaintEventArgs( VirtualGridCellElement cellElement, VirtualGridViewInfo viewInfo, Graphics graphics) : base(cellElement, viewInfo) { this.graphics = graphics; }
public VirtualGridRowPaintEventArgs( VirtualGridRowElement rowElement, VirtualGridViewInfo viewInfo, Graphics graphics) : base(rowElement, viewInfo) { this.graphics = graphics; }
public VirtualGridClipboardEventArgs( bool cancel, DataObject dataObject, VirtualGridViewInfo viewInfo) : base(cancel, dataObject) { this.viewInfo = viewInfo; }
public VirtualGridCellElementMouseEventArgs( VirtualGridCellElement cellElement, VirtualGridViewInfo viewInfo, MouseEventArgs mouseEventArgs) : base(cellElement, viewInfo) { this.mouseEventArgs = mouseEventArgs; }
private void OnChildViewInfoHeightChanged(VirtualGridViewInfo childView) { if (!this.childViewInfos.ContainsKey(childView.ParentRowIndex) || this.childViewInfos[childView.ParentRowIndex] != childView || !childView.IsExpanded) { return; } this.rowsViewState.SetExpandedSize(childView.ParentRowIndex, childView.ExpandedHeight); }
public VirtualGridPagingPanelElement( VirtualGridTableElement gridViewElement, VirtualGridViewInfo viewInfo) { this.gridViewElement = gridViewElement; this.viewInfo = viewInfo; this.UpdateVisibility(); }
public VirtualGridPageChangingEventArgs( int oldIndex, int newIndex, VirtualGridViewInfo viewInfo) { this.oldIndex = oldIndex; this.newIndex = newIndex; this.viewInfo = viewInfo; }
public VirtualGridTableElement(RadVirtualGridElement gridElement, VirtualGridViewInfo viewInfo) { this.gridElement = gridElement; this.viewInfo = viewInfo; this.viewInfo.PropertyChanged += new PropertyChangedEventHandler(this.OnViewInfoPropertyChanged); this.viewInfo.BindProperties(this); this.UpdateOnViewInfoChanged(); this.ColumnLayout = (BaseVirtualGridColumnLayout) new StandardVirtualGridColumnLayout(); }
public VirtualGridCreateCellEventArgs( int columnIndex, int rowIndex, Type cellType, VirtualGridViewInfo viewInfo) { this.columnIndex = columnIndex; this.rowIndex = rowIndex; this.cellType = cellType; this.viewInfo = viewInfo; }
public bool ColumnContainsSelection(int columnIndex, VirtualGridViewInfo viewInfo) { foreach (SelectionRegion selectedRegion in this.SelectedRegions) { if (selectedRegion.ViewInfo == viewInfo && selectedRegion.ContainsColumn(columnIndex)) { return(true); } } if (this.CurrentViewInfo == viewInfo) { return(this.SelectedRegion.ContainsColumn(columnIndex)); } return(false); }
public bool CollapseRow(int rowIndex) { VirtualGridViewInfo childViewInfo = this.GetChildViewInfo(rowIndex, true); VirtualGridRowExpandingEventArgs args = new VirtualGridRowExpandingEventArgs(rowIndex, childViewInfo, this); this.GridElement.OnRowCollapsing(args); if (args.Cancel || !this.childViewInfos.ContainsKey(rowIndex) || !this.childViewInfos[rowIndex].IsExpanded) { return(false); } this.childViewInfos[rowIndex].IsExpanded = false; this.rowsViewState.ResetExpandedSize(rowIndex); this.OnNotifyPropertyChanged("ExpandedRows[]"); this.GridElement.OnRowCollapsed(new VirtualGridRowExpandedEventArgs(rowIndex, childViewInfo, this)); return(true); }
public void BeginSelection( int rowIndex, int columnIndex, VirtualGridViewInfo viewInfo, bool keepSelection) { keepSelection &= this.currentViewInfo == viewInfo; VirtualGridSelectionChangingEventArgs args = new VirtualGridSelectionChangingEventArgs(keepSelection ? VirtualGridSelectionAction.BeginSelection : VirtualGridSelectionAction.ClearAndBeginSelection, rowIndex, columnIndex, viewInfo); this.OnSelectionChanging(args); if (args.Cancel) { return; } if (!keepSelection) { this.ClearSelectedRegions(); this.boundingRegion = SelectionRegion.Empty; } else { this.AddSelectedRegions(this.SelectedRegion); } this.currentViewInfo = viewInfo; this.startRow = this.endRow = rowIndex; if (this.SelectionMode == VirtualGridSelectionMode.CellSelect) { this.startColumn = this.endColumn = columnIndex; } else if (this.SelectionMode == VirtualGridSelectionMode.FullRowSelect) { this.startColumn = 0; this.endColumn = this.CurrentViewInfo.ColumnCount - 1; } this.OnSelectionChanged(); }
public VirtualGridCreateRowEventArgs(int rowIndex, Type rowType, VirtualGridViewInfo viewInfo) { this.rowIndex = rowIndex; this.rowType = rowType; this.viewInfo = viewInfo; }
public VirtualGridClipboardEventArgs(bool cancel, VirtualGridViewInfo viewInfo) : base(cancel) { this.viewInfo = viewInfo; }
public VirtualGridRowsEventArgs(IEnumerable <int> rowIndices, VirtualGridViewInfo viewInfo) : base(viewInfo) { this.rowIndices = rowIndices; }
public VirtualGridEventArgs(VirtualGridViewInfo viewInfo) { this.viewInfo = viewInfo; }