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
|
Nov 10, 2010 - 9:57 AM
|
CExtGridCellHeaderFilter can call CExtGridWnd::OnGbwFocusChanged() a lot when either a Text or Value filter is used & a row is focused in the grid. Can the focused row be cleared when applying filters?
|
|
Alastair Watts
|
Nov 11, 2010 - 3:12 PM
|
When do you suggest I call FocusUnset() Are you sure OnGbwFocusChanged() should be called for each row hidden when (Show All) is cleared?
|
|
Technical Support
|
Nov 13, 2010 - 8:19 AM
|
The focus changing notifications are received during sorting and filtering because the grid control tries to keep the same cells selected and focused after re-sorting or re-filtering. The CExtGridWnd class is derived from the CExtGridDataProvider::IDataProviderEvents interface which provides the OnDataProviderSortEnter() and OnDataProviderSortLeave() virtual methods. You can remove focus and/or selection from any cells in the overridden OnDataProviderSortEnter() virtual method. The CExtGridWnd::OnGridFilterUpdateForRows() virtual method applies filtered state to grid rows. You can also override it. Your method also can remove focus and/or selection before invoking the parent class method.
|
|
Technical Support
|
Nov 11, 2010 - 12:41 AM
|
You should invoke the CExtGridBaseWnd::FocusUnset() method.
|
|
Alastair Watts
|
Nov 10, 2010 - 11:14 AM
|
A bit more info ... the following steps will show the problem everytime: 1. Select the last row in the grid 2. Clear ’(Show All) in ’Value Filters’ OnGbwFocusChanged() is now called for every row in the list.
|
|