StartNewGroup() public method

Starts a new group by creating a new table and initializing its properties.
public StartNewGroup ( IEnumerable groupHeaderRowCellsData, bool shouldCheckOneGroupPerPage ) : void
groupHeaderRowCellsData IEnumerable New group's header row data
shouldCheckOneGroupPerPage bool Do we need a new page again?
return void
コード例 #1
0
ファイル: RowsManager.cs プロジェクト: slledru/PdfReport
        private IList <BaseColor> applyRowSettings(IList <CellData> row)
        {
            if (_setNumberOfRowsPerPageNeedsNewPage)
            {
                SharedData.PdfDoc.NewPage();
            }

            var backColor = CurrentRowInfoData.LastOverallDataRowNumber % 2 != 0 ? SharedData.Template.RowBackgroundColor : SharedData.Template.AlternatingRowBackgroundColor;
            var foreColor = CurrentRowInfoData.LastOverallDataRowNumber % 2 != 0 ? SharedData.Template.RowFontColor : SharedData.Template.AlternatingRowFontColor;

            CurrentRowInfoData.LastOverallDataRowNumber++;
            CurrentRowInfoData.LastGroupRowNumber++;

            if (GroupsManager.ShouldStartNewGroup(row))
            {
                GroupsManager.StartNewGroup(row, !_setNumberOfRowsPerPageNeedsNewPage);
            }
            else
            {
                if (CurrentRowInfoData.LastOverallDataRowNumber == 1)
                {
                    TableInitAddHeaderAndFooter();
                }
            }

            return(new List <BaseColor> {
                backColor, foreColor
            });
        }