|
|
|
|
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.
Subject |
Author |
Date |
|
Alastair Watts
|
Dec 15, 2010 - 6:36 AM
|
When all CExtGridWnd rows are hidden and you call: false); RowUnHideAll(
UpdateStaticFilterValueForOuterRow(-1);
The filter value list is incorrectly populated.
|
|
Technical Support
|
Jan 20, 2011 - 2:29 AM
|
There are several very critical errors in the following method:
BOOL CtoolbartestDlg::OnCmdMsg(UINT nID, INT nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
CCmdUI * pCmdUI = (CCmdUI*)pExtra;
// update UI
if(nCode == CN_UPDATE_COMMAND_UI)
{
switch(nID)
{
case ID_ADD:
pCmdUI->Enable();
// PROF-UIS TECH SUPPORT: if you are going to change pCmdUI, then return TRUE please
//break; // PROF-UIS TECH SUPPORT: commented
return TRUE; // PROF-UIS TECH SUPPORT: added
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// PROF-UIS TECH SUPPORT: commented block of code
// PROF-UIS TECH SUPPORT: it’s heavy block and it’s very critical error not to analyze nID and pExtra here!
// PROF-UIS TECH SUPPORT: it’s VERY VERY VERY critical error!
// command
if(nCode == CN_COMMAND)
{
m_wndGrid.RowRemove(0);
m_wndGrid.RowUnHideAll(false);
m_wndGrid.UpdateStaticFilterValueForOuterRow(-1);
m_wndGrid.CExtGridWnd::OnGridFilterUpdateForRows(0L, -1L, true, NULL);
m_wndGrid.OnSwUpdateScrollBars();
m_wndGrid.OnSwDoRedraw();
}
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// PROF-UIS TECH SUPPORT: added instead of commented above (BEGIN) * * * * * * * * * * * *
if( nCode == CN_COMMAND && nID == ID_ADD )
{
if( pExtra == NULL )
{
m_wndGrid.RowRemove(0);
m_wndGrid.RowUnHideAll(false);
m_wndGrid.UpdateStaticFilterValueForOuterRow(-1);
m_wndGrid.CExtGridWnd::OnGridFilterUpdateForRows(0L, -1L, true, NULL);
m_wndGrid.OnSwUpdateScrollBars();
m_wndGrid.OnSwDoRedraw();
}
return TRUE;
}
// PROF-UIS TECH SUPPORT: added instead of commented above (END) * * * * * * * * * * * * *
return CExtResizableDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
The value filters work correctly after we apply these fixes.
|
|
Alastair Watts
|
Jan 20, 2011 - 3:47 PM
|
Thanks for the fix ... perhaps you would post the code here so that other can benefit :)
|
|
Alastair Watts
|
Jan 19, 2011 - 10:15 AM
|
|
|
Alastair Watts
|
Dec 15, 2010 - 9:18 AM
|
... infact it seems to fail with both 0 & 1 rows visible. 2+ rows works great!
|
|