Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 5
0
 public VirtualGridClipboardEventArgs(
     bool cancel,
     DataObject dataObject,
     VirtualGridViewInfo viewInfo)
     : base(cancel, dataObject)
 {
     this.viewInfo = viewInfo;
 }
Ejemplo n.º 6
0
 public VirtualGridCellElementMouseEventArgs(
     VirtualGridCellElement cellElement,
     VirtualGridViewInfo viewInfo,
     MouseEventArgs mouseEventArgs)
     : base(cellElement, viewInfo)
 {
     this.mouseEventArgs = mouseEventArgs;
 }
Ejemplo n.º 7
0
 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();
 }
Ejemplo n.º 9
0
 public VirtualGridPageChangingEventArgs(
     int oldIndex,
     int newIndex,
     VirtualGridViewInfo viewInfo)
 {
     this.oldIndex = oldIndex;
     this.newIndex = newIndex;
     this.viewInfo = viewInfo;
 }
Ejemplo n.º 10
0
 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;
 }
Ejemplo n.º 12
0
 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);
 }
Ejemplo n.º 13
0
        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);
        }
Ejemplo n.º 14
0
        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();
        }
Ejemplo n.º 15
0
 public VirtualGridCreateRowEventArgs(int rowIndex, Type rowType, VirtualGridViewInfo viewInfo)
 {
     this.rowIndex = rowIndex;
     this.rowType  = rowType;
     this.viewInfo = viewInfo;
 }
Ejemplo n.º 16
0
 public VirtualGridClipboardEventArgs(bool cancel, VirtualGridViewInfo viewInfo)
     : base(cancel)
 {
     this.viewInfo = viewInfo;
 }
Ejemplo n.º 17
0
 public VirtualGridRowsEventArgs(IEnumerable <int> rowIndices, VirtualGridViewInfo viewInfo)
     : base(viewInfo)
 {
     this.rowIndices = rowIndices;
 }
Ejemplo n.º 18
0
 public VirtualGridEventArgs(VirtualGridViewInfo viewInfo)
 {
     this.viewInfo = viewInfo;
 }