Hi,
I tried to use the CBCGPGridCtrl class as a tree, where some cells can be merged. However, I have immediately got a problem in the following scenario of the grid control creation:
1) Create at least two top-level rows.
2) In the second row, merge some items, for example, all items in the row.
3) Add a subitem to the first top-level row.
4) Call AdjustLayout() method.
As a result, the second top-level row will get a correct new row ID, but it seems that nobody cares to update the merged cells info, so that merged cells info and the row ID become incompatible. The result is ASSERT in the CBCGPGridMergedCells::MarkChanged method and severely incorrect work.
In order to demonstrate this problem, take the BCGPGridExample example and add a single row:
m_wndGridTree.MergeRange(CBCGPGridRange(0, m_wndGridTree.GetRowCount()-1, nColumns-1, m_wndGridTree.GetRowCount()-1), FALSE);
after the row:
pRoot->AddSubItem (pUsers, FALSE);
in the TreeDlg.cpp file. In the running example application, show the tree dialog, scroll it to make the "Users" row visible, and get a plenty of ASSERT's.