|
|
|
|
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 |
|
Johannes Schwenk
|
Jul 15, 2008 - 9:52 AM
|
Hallo, 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: BseModifyStyle(
__EGWS_BSE_EDIT_CELLS_OUTER_B
|__EGWS_BSE_EDIT_SINGLE_FOCUSED_ONLY
|__EGWS_BSE_EDIT_DOUBLE_LCLICK
|__EGWS_BSE_EDIT_RETURN_CLICK
,
0L,
false
); SiwModifyStyle(
__EGBS_SFB_CELLS
|__EGBS_RESIZING_CELLS_OUTER_H
|__EGBS_RESIZING_CELLS_OUTER_V
|__EGBS_FIXED_SIZE_ROWS
//|__ESIS_DISABLE_THUMBTRACK_V
|__ESIS_DISABLE_AUTOHIDE_SB,
0L,
false
); _cellHeaderLeft.ModifyStyle(
__EGCS_HDR_FOCUS_ARROW_DISPLAY |
__EGCS_HDR_FOCUS_ARROW_RESERVE_SPACE
); Thank you for the help, Joschwenk
|
|
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.
|
|