Ejemplo n.º 1
0
        private void radComboBoxSystemRowPosition_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            RadListDataItem radComboBoxSystemRowPositionItem = this.radComboBoxSystemRowPosition.SelectedItem as RadListDataItem;

            if (radComboBoxSystemRowPositionItem == null)
            {
                return;
            }

            SystemRowPosition sysRowPosition = (SystemRowPosition)radComboBoxSystemRowPositionItem.Value;

            RadListDataItem radComboBoxItem = this.radComboBoxSystemRows.SelectedItem as RadListDataItem;

            if (radComboBoxItem == null)
            {
                return;
            }

            GridViewSystemRowInfo systemRow = radComboBoxItem.Value as GridViewSystemRowInfo;

            if (systemRow != null)
            {
                systemRow.RowPosition = sysRowPosition;
            }
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        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;
            }
        }