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 » Can't edit CExtGridCellString when in a frozen column Collapse All
Subject Author Date
Krustys Donuts Mar 6, 2009 - 1:44 PM

I have a CExtGridWind with CExtGridCellString cells in the first column. When one of these cells is double-clicked, my override of OnGbwBeginEdit is called and I call the super class OnGbwBeginEdit. This seems to be working fine. When I add the line:



FrozenColumnCountLeftSet(1, false);


the edit on double-click no longer functions properly. Is there a bug here?


 


Gil


Technical Support Mar 9, 2009 - 10:38 AM

We are sorry for this inconvenience. To fix this issue, please update the source code for the following method:</pre>void CExtGridWnd::OnGridCellInplaceControlAdjustCreationRect(
CExtGridCell & _cell,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
RECT & rcInplaceControl, // RECT to adjust
LONG nLastEditedColNo,
LONG nLastEditedRowNo
)
{
ASSERT_VALID( this );
ASSERT_VALID( (&_cell) );
_cell;
nVisibleColNo;
nVisibleRowNo;
nColNo;
nRowNo;
nColType;
nRowType;
rcCellExtra;
rcCell;
rcInplaceControl;
nLastEditedColNo;
nLastEditedRowNo;
if( nColType == 0 && nRowType == 0 )
{
CRect rcFrozenRange = OnSiwGetFrozenRange();
ASSERT( rcFrozenRange.top >= 0 && rcFrozenRange.bottom >= 0 && rcFrozenRange.left >= 0 && rcFrozenRange.right >= 0 );
if( nColNo < rcFrozenRange.left )
return;
if( nRowNo < rcFrozenRange.top )
return;
LONG nColCount = ColumnCountGet();
LONG nColFR = nColCount - rcFrozenRange.right;
if( nColNo >= nColFR )
return;
LONG nRowCount = RowCountGet();
LONG nRowFR = nRowCount - rcFrozenRange.bottom;
if( nRowNo >= nRowFR )
return;
CRect rcClient = OnSwGetClientRect();
rcInplaceControl.left = max( rcInplaceControl.left, rcClient.left );
rcInplaceControl.top = max( rcInplaceControl.top, rcClient.top );
rcInplaceControl.right = min( rcInplaceControl.right, rcClient.right );
rcInplaceControl.bottom = min( rcInplaceControl.bottom, rcClient.bottom );
return;
}
}
</pre>