to post a new message or reply to an existing one. If you are not registered, please
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Jul 30, 2008 - 1:04 AM
Dear Technical team,
I have met a problem about the CExtGridCell. Next I list the details:
For example, I have created 8 rows in the CExtGridCell.
1. Press CTRL key on keyboard
2. Use left button of mouse to click three rows(eg, row 1, row 2 and row 3), now these rows are selected
3. Use left button of mouse to click row 3, now I want row 3 is not selected
4. Use left button of mouse to click row 3 again, now I want row 3 is selected
Press CTRL + A to select all rows
How can I do it? Would you mind to tell me?
Thank you in advance!
Jul 31, 2008 - 1:16 PM
There are two selection behaviors supported by the grid windows in Prof-UIS:
1) Simple. Selecting the already selected cell areas does not invert the selection state.
2) Subtractive. You can select/unselect any grid areas many times.
To select subtractive behavior in the grid window you should invoke its
CExtGridBaseWnd::SubtractSelectionAreasSet() method or apply the
__EGBS_SUBTRACT_SEL_AREAS style by invoking grid’s
SiwModifyStyle() method. Please note, you should use the
CExtGridBaseWnd::SelectionGetForCell() method for detecting selected state of any grid cell.
Both simple and subtractive selection behaviors is very well demonstrated in different grid controls in the SimpleGrids sample application where you can also read related information in the Help bar.