Ejemplo n.º 1
0
void CXTPReportGroupRow::UpdateSelectedChilds()
{
	for (int II = 0; II < m_pControl->m_pPlainTree->GetCount(); II++)
	{
		CXTPReportRow* pTRow = m_pControl->m_pPlainTree->GetAt(II);
		if (pTRow)
		{
			if (pTRow->IsGroupRow())
			{
				CXTPReportGroupRow* pTgRow = (CXTPReportGroupRow*) pTRow;
				if (pTgRow->GetChilds(FALSE) && pTgRow->IsExpanded())
				{
					for (int J = 0; J < pTgRow->GetChilds()->GetCount(); J++)
					{
						CXTPReportRow* pChRow = pTgRow->GetChilds(FALSE)->GetAt(J);
						if (pChRow)
						{
							CXTPReportRecord* pChRec = pChRow->GetRecord();
							if (pChRec)
							{
								CXTPReportRow* ptRow = m_pControl->m_pPlainTree->FindInTree(pChRec);
								if (ptRow && !ptRow->IsGroupRow())
									ptRow->SetSelected(pChRec->m_bSelectedAsChildFlag);
							}
						}
					}
				}
			}
		}
	}
}
Ejemplo n.º 2
0
void CXTPReportGroupRow::UpdateSelectedMostDeepChilds()
{
	for (int II = 0; II < m_pControl->GetRows()->GetCount(); II++)
	{
		CXTPReportRow* pRow = m_pControl->GetRows()->GetAt(II);
		if (pRow->GetChilds(FALSE)) continue;
		CXTPReportRecord* pChRec = pRow->GetRecord();
		if (pChRec)
			pRow->SetSelected(pChRec->m_bSelectedAsChildFlag);
		//if (pChRec && !pRow->IsGroupRow())
		//  pRow->SetSelected(pChRec->m_bSelectedAsChildFlag);
		//else if (pRow->IsGroupRow())
		//  pRow->SetSelected(FALSE);
	}
}
void CXTPReportGroupRow::UpdateSelectedMostDeepChilds()
{
	for (int nRow=0; nRow<m_pSection->GetRows()->GetCount(); nRow++)
	{
		CXTPReportRow *pRow = m_pSection->GetRows()->GetAt(nRow);

		if (pRow->GetChilds(FALSE))
			continue;

		CXTPReportRecord *pRecord = pRow->GetRecord();
		if (pRecord)
		{
			pRow->SetSelected(pRecord->IsSelected());
		}
	}
}
Ejemplo n.º 4
0
void CSimpleReport::RowSetSelected(int nRow) 
{
	CXTPReportRow* pRow = GetRows()->GetAt(nRow);
	if (pRow)
		pRow->SetSelected(TRUE);
}