Ejemplo n.º 1
0
        protected virtual GridViewFilteringRowInfo CreateFilteringRow()
        {
            GridViewCreateRowInfoEventArgs e = new GridViewCreateRowInfoEventArgs((GridViewRowInfo) new GridViewFilteringRowInfo(this), this);

            this.ownerTemplate.OnCreateRowInfo(e);
            return(e.RowInfo as GridViewFilteringRowInfo);
        }
Ejemplo n.º 2
0
        protected virtual void BuildBottomSummaryRows()
        {
            if (this.ViewTemplate.SummaryRowsBottom.Count <= 0)
            {
                return;
            }
            int index = 0;

            while (index < this.bottomSummaryRowSource.Count)
            {
                if (!this.ViewTemplate.SummaryRowsBottom.Contains(this.bottomSummaryRowSource[index].SummaryRowItem))
                {
                    this.bottomSummaryRowSource.RemoveAt(index);
                }
                else
                {
                    ++index;
                }
            }
            foreach (GridViewSummaryRowItem summaryItem in (Collection <GridViewSummaryRowItem>) this.ViewTemplate.SummaryRowsBottom)
            {
                if (!this.bottomSummaryRows.Contains(summaryItem))
                {
                    GridViewCreateRowInfoEventArgs e = new GridViewCreateRowInfoEventArgs((GridViewRowInfo) new GridViewSummaryRowInfo(this.ViewInfo, this), this.ViewInfo);
                    this.ViewTemplate.OnCreateRowInfo(e);
                    GridViewSummaryRowInfo rowInfo = e.RowInfo as GridViewSummaryRowInfo;
                    if (rowInfo != null)
                    {
                        rowInfo.SummaryRowItem = summaryItem;
                        this.bottomSummaryRowSource.Add(rowInfo);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        protected virtual GridViewDetailsRowInfo CreateGridViewDetailsRowInfo(
            GridViewHierarchyRowInfo hierarchyRow)
        {
            GridViewCreateRowInfoEventArgs e = new GridViewCreateRowInfoEventArgs((GridViewRowInfo) new GridViewDetailsRowInfo(this), hierarchyRow.ViewInfo);

            this.ViewTemplate.OnCreateRowInfo(e);
            return(e.RowInfo as GridViewDetailsRowInfo);
        }
Ejemplo n.º 4
0
        internal GridViewSummaryRowInfo Add(
            GridViewInfo viewInfo,
            GridViewSummaryRowItem summaryItem,
            bool top)
        {
            GridViewCreateRowInfoEventArgs e = new GridViewCreateRowInfoEventArgs((GridViewRowInfo) new GridViewSummaryRowInfo(viewInfo, (GridViewGroupRowInfo)null), viewInfo);

            viewInfo.ViewTemplate.OnCreateRowInfo(e);
            GridViewSummaryRowInfo rowInfo = e.RowInfo as GridViewSummaryRowInfo;

            if (rowInfo != null)
            {
                rowInfo.SummaryRowItem = summaryItem;
                rowInfo.RowPosition    = top ? SystemRowPosition.Top : SystemRowPosition.Bottom;
                this.Items.Add(rowInfo);
            }
            return(rowInfo);
        }
Ejemplo n.º 5
0
        public Group <GridViewRowInfo> CreateGroup(
            object key,
            Group <GridViewRowInfo> parent,
            params object[] metaData)
        {
            DataGroup dataGroup = new DataGroup(key, parent, this.owner);
            GridViewCreateRowInfoEventArgs e = new GridViewCreateRowInfoEventArgs((GridViewRowInfo)dataGroup.GroupRow, this.owner.MasterViewInfo);

            this.owner.OnCreateRowInfo(e);
            GridViewGroupRowInfo rowInfo = e.RowInfo as GridViewGroupRowInfo;

            if (rowInfo != null && rowInfo != dataGroup.GroupRow)
            {
                rowInfo.ViewInfo   = this.owner.MasterViewInfo;
                dataGroup.GroupRow = rowInfo;
            }
            return((Group <GridViewRowInfo>)dataGroup);
        }