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

Grid Grouping Control Selection Color

Thread ID:

Created:

Updated:

Platform:

Replies:

46745 Jul 19,2006 07:06 PM Jul 20,2006 04:49 PM Windows Forms 6
loading
Tags: GridControl
Greg Patterson
Asked On July 19, 2006 07:06 PM

I am using GGC 4.1.0.62 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.

http://www.syncfusion.com/Support/user/uploads/PreViewWithSelection_ab462dd2.zip

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:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=12165

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.


GGCScreenShot20060719.zip

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

Hi Gregg,

Please refer to the Knowledge Base(KB) article link below, which explains the selection types that can be made for the GridGroupingControl.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=344


Let me know if you have any further questions.
Regards,
Rajagopal

Greg Patterson
Replied On July 20, 2006 09:00 AM

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 10:55 AM

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 02:09 PM

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 03:33 PM

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.

http://www.syncfusion.com/Support/user/uploads/PreViewWithSelection_e7ffa3b8.zip


Greg Patterson
Replied On July 20, 2006 04:49 PM

Thanks Clay, that solves my problem.

CONFIRMATION

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.

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.

;