I''m using a GridGroupingControl and would like to limit row selection (via mouse-click or keyboard) to only those rows that actually contain data from my dataset - i.e. not highlight the row if it is a group section header, preview row, group footer and the like.
Any ideas how this could be done?
ADAdministrator Syncfusion Team September 1, 2004 09:48 AM
We will be adding support to manage this in the next month or so. For now, there is not an easy way to do this. You can try to manage the painting of teh selections yourself. You coul dturn off the alpha part of the grid''s default selection coloring so you woul dnot see the grid''s selections. Then you could handle teh PrepareViewStyleInfo on teh underlying grid to set the backcolor if the selected row is a record. Here is a rough sample.
MWMike WoolleySeptember 2, 2004 02:54 AM
Many thanks, that seems to work nicely for mouse-click selections, although the keyboard navigation doesn''t work as expected from the user''s perspective - if you scroll through the top or bottom of a child group with the keyboard arrows, the selection disappears through the top or bottom of the group as the group headers, etc. are selected.
Is there a relatively simple work-around for this, or should we wait for support to be built into a forthcoming release?
ADAdministrator Syncfusion Team September 2, 2004 03:39 AM
Are you using 22.214.171.124?
I may be misunderstanding what you are describing, but in the sample, if I ctl+down from one expanded group to another expanded, I see the records remaining selected in the top group and continuing the selection in the bottom group as I move with ctl+down. Are you not seeing this behavior? Or, do you want some other behavior?
MWMike WoolleySeptember 2, 2004 04:43 AM
No, I''m currently using 126.96.36.199 - I''ll upgrade!
Ideally, the behaviour I''d like is as follows(please have a look at the attached image):
The row for ''syncgridvirtual.vsd'' is currently highlighted. If the down arrow is pressed, the row for ''explorerstructure.vsd'' is highlighted.
If the group below the ''syncgridvirtual.vsd'' row is not expanded, then expand it and continue as above.
Similar for scrolling through the top of a group.
Is this achievable without too much effort?
ADAdministrator Syncfusion Team September 2, 2004 05:24 AM
I think the sample code will allow you to selected across expanded groups in 188.8.131.52, but getting the ''auto'' expand of collapsed groups will likely be tricky. I tried it using this.gridGroupingControl1.TableControl.Model.SelectionChanging but could not come up with a way of handling it. Maybe you could use MouseMouse and do something, but I think it will be tricky.