Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Grid: Split cells error Collapse All
Subject Author Date
Phillip Bernard Jun 19, 2008 - 8:36 AM

Hello.
I create simple grid with 2 columns and 1 row.

Than I call
GridCellJoinSet( CSize(1, 2), 0, 0);
and than
GridCellJoinSet( CSize(1, 1), 0, 0);

on painting this grid I get Assert at CExtGridWnd.cpp:2426
...
CSize _sizeRealJoin = OnGbwCellJoinQueryInfo( nRealColNo, nRealRowNo, nColType, nRowType );

CRect rcWalkExtent( 0, 0, 0, 0 );

if( sizeJoin.cx > 1 )
rcWalkExtent.right = sizeJoin.cx - 1;
else if( sizeJoin.cx <= 0 )
{
ASSERT( _sizeRealJoin.cx >= 1 );
...

OnGbwCellJoinQueryInfo(...) retrun CSize(0, 1);

What I do wrong ?

Phillip Bernard Jun 23, 2008 - 4:09 AM

I try

in OnInitDialog
...
m_Grid.Create(this, CRect(201, 0, 400, 200));
m_Grid.SiwModifyStyle(__ESIS_STH_PIXEL|__ESIS_STV_PIXEL|__EGBS_GRIDLINES );

m_Grid.ColumnAdd(2);
m_Grid.RowAdd(10);

for(i = 0; i < m_Grid.RowCountGet(); i++)
{
for(j = 0; j < m_Grid.ColumnCountGet(); j++)
{
CExtGridCellString *pCell;
pCell = STATIC_DOWNCAST(CExtGridCellString, m_Grid.GridCellGet(j, i, 0, 0, RUNTIME_CLASS(CExtGridCellString)));
pCell->TextSet(_T("Test"));
}
}

m_Grid.GridCellJoinSet(CSize(2, 1), 0, 5); //Merge
m_Grid.GridCellJoinSet(CSize(1, 1), 0, 5); //Split
...

When I move mouse over grid I get assert at CExtGridWnd.cpp:2426

Technical Support Jun 23, 2008 - 3:40 AM

We have just a bit extended an article on how to merge and split cells:

How to merge a group of grid cells?

Please make sure that all merged cells are properly initialized. If it does not help, just contact us again.