Grid Grouping Control Selection Color
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.
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
SIGN IN To post a reply.
6 Replies
AD
Administrator
Syncfusion Team
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.
Regards,
Rajagopal
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
GP
Greg Patterson
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?
AD
Administrator
Syncfusion Team
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;
GP
Greg Patterson
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?
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?
AD
Administrator
Syncfusion Team
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.
http://www.syncfusion.com/Support/user/uploads/PreViewWithSelection_e7ffa3b8.zip
http://www.syncfusion.com/Support/user/uploads/PreViewWithSelection_e7ffa3b8.zip
GP
Greg Patterson
July 20, 2006 08:49 PM UTC
Thanks Clay, that solves my problem.
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
GP Greg Patterson
- Jul 19, 2006 11:06 PM UTC
- Jul 20, 2006 08:49 PM UTC