Esempio n. 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);
        }
Esempio n. 2
0
 public bool HasChildRows()
 {
     if (this.ownerTemplate.EnableFiltering && this.ownerTemplate.FilterDescriptors.Count > 0)
     {
         return(true);
     }
     if ((this.parentRow != null || this.ViewTemplate.IsSelfReference) && (this.ViewTemplate.HierarchyDataProvider != null && !this.ViewTemplate.HierarchyDataProvider.IsValid))
     {
         return(false);
     }
     if (this.ChildRows.Count > 0 || GridTraverser.IsNewRowVisible(this.TableAddNewRow) || this.ownerTemplate.AllowSearchRow)
     {
         return(true);
     }
     if (this.ownerTemplate.EnableFiltering)
     {
         return(this.ownerTemplate.ShowFilteringRow);
     }
     return(false);
 }