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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Grouping Control Selection Color

Thread ID:





46745 Jul 19,2006 11:06 PM UTC Jul 20,2006 08:49 PM UTC WinForms 6
Tags: GridControl
Greg Patterson
Asked On July 19, 2006 11:06 PM UTC

I am using GGC with the following options:
gcEmailGrouping.TableOptions.AllowSelection = GridSelectionFlags.None;
gcEmailGrouping.TableOptions.ListBoxSelectionMode = SelectionMode.One;
Where gcEmailGrouping is the GGC.
I also have an option to turn on/off the record preview row at runtime using a similar technique demonstrated in this sample.


Selected rows highlight properly without the record preview and for the currently selected record when preview is first turned on, but as soon as another selection is made while preview is on, the new selection will be brown. I have the exact same behavior described in the following post:

The attached screen shots demonstrate the results.

In the solution from the above thread, you suggest making the following changes:
gcEmailGrouping.TableOptions.AllowSelection = GridSelectionFlags.AlphaBlend;
gcEmailGrouping.TableModel.Options.AlphaBlendSelectionColor = Color.FromArgb(1, 0, 0, 0);

While this solves the color problem, I lose the gcEmailGrouping.SelectedRecordsChanged event which has been utilized to pass up critical information to our parent controls.

What is the best way to solve the color problem and still catch the SelectedRecordsChanged event.


Administrator [Syncfusion]
Replied On July 20, 2006 06:23 AM UTC

Hi Gregg,

Please refer to the Knowledge Base(KB) article link below, which explains the selection types that can be made for the GridGroupingControl.

Let me know if you have any further questions.

Greg Patterson
Replied On July 20, 2006 01:00 PM UTC

I am familiar with the above KB article. I need to be able pass out record information from the SelectedRecordsChanged event (i.e. AllowSelection = GridSelectionFlags.None;) while not having the selected record reverse alphablend to some brownish color. Is this just not possible?

Administrator [Syncfusion]
Replied On July 20, 2006 02:55 PM UTC

Try setting these properties to see if they do what you need.

this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;
this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;
this.gridGroupingControl1.TableOptions.SelectionBackColor = Color.FromArgb(0, Color.Blue);
this.gridGroupingControl1.TableOptions.ListBoxSelectionColorOptions = GridListBoxSelectionColorOptions.ApplySelectionColor;

Greg Patterson
Replied On July 20, 2006 06:09 PM UTC

Hey Clay,
I tried the options you listed above, but they don''t seem to have any affect. I''m attaching some of the code. Any other ideas?

Administrator [Syncfusion]
Replied On July 20, 2006 07:33 PM UTC

I think the simplest way to get this handled is to turn the GridSelectionFlags.AlphBlend back on. If the reason you do not want to do this is that it loses the RecordSelectionChanging event, then I think you can force that event to be raised by selecting the record when you add the range to the Selections. Here is that sample back showing how this might be done.


Greg Patterson
Replied On July 20, 2006 08:49 PM UTC

Thanks Clay, that solves my problem.


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

or the page will be automatically redirected to 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