Professional UI Solutions
Site Map   /  Register


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 General Discussion » CExtGridWnd selection disappearing Collapse All
Subject Author Date
D. Cameron DeHeer Sep 19, 2007 - 8:08 AM

i am using a CExtGridWnd in association with a CExtPropertyGridWnd in my application, where the grid contains a list of items with some properties, and the full set of properties for the selected item in the grid is modifiable from the property grid. i have overridden CExtGridWnd::OnGbwSelectionChanged to update the currently selected item in the associated property grid. when i select a new item in the grid i get an OnGbwSelectionChanged to the proper item, which is fine. if i then select a property in the property grid to change, i do not get an OnGbwSelectionChanged, which is also fine (the grid selection has not changed). however, if i then modify that property (via an up/down button for example), or select a different property in the property grid, i get an OnGbwSelectionChanged in the grid that essentially sets the selection to nothing (which my code then responds to by setting the property grid’s item to null). i have created the grid with:


any ideas why my grid selection is going away? thanks in advance for any help you can provide...

Technical Support Sep 19, 2007 - 1:14 PM

We need more details about how you manage selections in the CExtGridWnd control. Please let us know If you change selection using CExtGridBaseWnd::Selection***() APIs when handling property value changing in the property grid?

Generally, the OnGbwSelectionChanged() virtual method notifies you about changing a selection region rather than about changing grid cell values.

D. Cameron DeHeer Sep 19, 2007 - 1:57 PM

thanks for the quick response, but i’m afraid i wasted your time. when the property grid values changed, i was repopulating the entire grid rather than just the affected row in the overloaded CExtPropertyGrid::OnPgcInputComplete. this (of course) caused the selection in the grid to be lost. sorry to have bothered you with this, and thanks again for the help...

Technical Support Sep 20, 2007 - 5:42 AM

You are welcome and you can also send your project to if you encounter any difficulties.