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 » Styles for the CExtGrid Control Collapse All
Subject Author Date
Johannes Schwenk Jul 15, 2008 - 9:52 AM



I`m using the Grid class from the Ado Recordset example. Now i want to have the following:


When the user clicks on a cell one time, the whole row should be in another color, and the arrow should be shown at the left outer cell.

At the moment, nothing happens when I click on a cell one time. With a double click, I can edit it...


The Styles:























                            __EGCS_HDR_FOCUS_ARROW_DISPLAY |




Thank you for the help,





Technical Support Jul 19, 2008 - 12:31 PM

You have correctly configured the header cell at left for displaying focus arrow in the focused row and reserve space for focus arrow in unfocused rows. The focused arrow should be displayed but only if the header column at left has enough large width for displaying it.

The row highlighting on mouse click feature is not supported by the grid control explicitly. You should override the CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method, invoke parent class method and colorize backgrounds of of all the data cells in the clicked row using the CExtGridCell::BackColorSet() method.

Please note, you are using cache-able grid window. It keeps grid cells of visible row range only. So, you should also keep colorized row states somewhere and initialize data cells with colorized backgrounds in the data provider’s code.