ShouldStartNewGroup() public method

Should we start a new group based on the current row's data?
public ShouldStartNewGroup ( IList rowCellsData ) : bool
rowCellsData IList Current row's data
return bool
コード例 #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
            });
        }