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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl row selection

Thread ID:





18500 Sep 1,2004 01:10 PM UTC Sep 2,2004 10:24 AM UTC WinForms 5
Tags: GridControl
Mike Woolley
Asked On September 1, 2004 01:10 PM UTC

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?

Administrator [Syncfusion]
Replied On 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

Mike Woolley
Replied On 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?

Administrator [Syncfusion]
Replied On 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?

Mike Woolley
Replied On 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

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon