Пример #1
0
        protected virtual bool OnRowVisible()
        {
            if (this.current == null)
            {
                return(false);
            }
            bool flag = (this.processHiddenRows || this.current.IsVisible) && this.pinPosition == this.current.PinPosition;

            if (this.pinPosition == PinnedRowPosition.None)
            {
                GridViewSystemRowInfo current = this.current as GridViewSystemRowInfo;
                if (current != null && current.RowPosition != this.rowPosition)
                {
                    flag = false;
                }
            }
            if (this.viewInfo.ViewTemplate.GroupDescriptors.Count > 0 && this.current is GridViewSummaryRowInfo && !this.viewInfo.ViewTemplate.ShowTotals)
            {
                flag = false;
            }
            if (this.current is GridViewTableHeaderRowInfo)
            {
                flag = flag && this.viewInfo.ViewTemplate.ShowColumnHeaders;
            }
            else if (this.current is GridViewNewRowInfo)
            {
                flag = flag && GridTraverser.IsNewRowVisible(this.current as GridViewNewRowInfo);
            }
            else if (this.current is GridViewSearchRowInfo)
            {
                flag = flag && this.viewInfo.ViewTemplate.AllowSearchRow;
            }
            else if (this.current is GridViewFilteringRowInfo)
            {
                flag = flag && this.viewInfo.ViewTemplate.EnableFiltering && this.viewInfo.ViewTemplate.ShowFilteringRow;
            }
            else if (this.current is GridViewDetailsRowInfo)
            {
                GridViewHierarchyRowInfo owner = ((GridViewDetailsRowInfo)this.current).Owner as GridViewHierarchyRowInfo;
                if (owner != null)
                {
                    flag = flag && owner.IsExpanded;
                }
            }
            if (this.RowVisible == null)
            {
                return(flag);
            }
            RowEnumeratorEventArgs e = new RowEnumeratorEventArgs(this.current);

            e.ProcessRow = flag;
            this.RowVisible((object)this, e);
            return(e.ProcessRow);
        }
 protected override int CompareToSystemRowInfo(GridViewSystemRowInfo row)
 {
     if (row == null || row is GridViewTableHeaderRowInfo || row is GridViewNewRowInfo)
     {
         return(1);
     }
     if (row is GridViewSearchRowInfo)
     {
         return(-1);
     }
     if (row is GridViewFilteringRowInfo)
     {
         return(0);
     }
     return(base.CompareToSystemRowInfo(row));
 }
Пример #3
0
 protected override int CompareToSystemRowInfo(GridViewSystemRowInfo row)
 {
     if (row is GridViewTableHeaderRowInfo || row is GridViewFilteringRowInfo)
     {
         return(1);
     }
     if (row is GridViewNewRowInfo)
     {
         return(this.PinPosition == PinnedRowPosition.Top ? 1 : -1);
     }
     if (row is GridViewSearchRowInfo)
     {
         return(0);
     }
     return(base.CompareToSystemRowInfo(row));
 }
Пример #4
0
 protected override int CompareToSystemRowInfo(GridViewSystemRowInfo row)
 {
     return(row is GridViewTableHeaderRowInfo ? 0 : -1);
 }