We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridGroupingControl row selection

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?

5 Replies

AD Administrator Syncfusion Team September 1, 2004 02:48 PM UTC

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. CS_2804.zip

MW Mike Woolley September 2, 2004 07:54 AM UTC

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?

AD Administrator Syncfusion Team September 2, 2004 08:39 AM UTC

Are you using 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?

MW Mike Woolley September 2, 2004 09:43 AM UTC

No, I''m currently using - 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? Thanks again! grid_ex_4003.zip

AD Administrator Syncfusion Team September 2, 2004 10:24 AM UTC

I think the sample code will allow you to selected across expanded groups in, 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.

Live Chat Icon For mobile
Up arrow icon