I would like that the in the first row, a covered cell spans all columns in the row (so that I can make a big header)
You could override the following two methods (e.g. if row 1 is covered):
CGXRange* C1stGridView::GetCoveredCellsRowCol(ROWCOL nRow, ROWCOL nCol,
CGXRange& range)
{
// check if this is a covered row
if (nRow == 1 && nCol > 0)
{
range.SetCells(nRow, 1, nRow, GetColCount());
return ⦥
}
// normal cell
return GetCoveredCellsRowCol(nRow, nCol, range)
}
void C1stGridView::MergeCoveredCells(CGXRange& area)
{
// check if area includes a covered row (if you have several rows, you
might loop through the
// covered rows and test if one of the covered rows is in the area)
if (area.top <= 1 && area.bottom >= 1)
{
area.left = 1;
area.right = GetColCount();
}
CGXGridCore::MergeCoveredCells(area);
}
This will also take care if you later add columns to the grid.