Could you tell me please what the correct usage is for unhighlighting a row in the GridGroupingControl. I did the following in the designer.
1. Set AllowSelection = row
2. ListBoxSelectionColorOptions = Apply Selection Color
3. ListBoxSelectionMode = One
4. SelectionBackColor = Highlight
5. SelectionTextColor = HightlightText
then in code to unhighlight I wrote...
_sfDataGridGrouping.TableControl.Selections.Clear(true);
Is this correct? Do I need to pass in true?
Also even though the SelectionBackColor is set to Highlight, when I click on it the backcolor turns black instead of to the Highlight color set above.
Finally to highlight it I wrote inside the PrepareViewStyleInfo event...(I did this because the backcolor was black and not the intended highlight color.)
e.Inner.Style.BackColor = Color.Blue;
e.Inner.Style.TextColor = Color.White;
Is this correct?
Thank You.
Morgan - New Customer
AD
Administrator
Syncfusion Team
March 22, 2005 11:19 PM UTC
There are two selection techniques available in GridGroupingControl. One is inherited from GridControlBase through the GridTable object. It allows you to select ranges of cells depending upon the AllowSelection setting.
If you want to use record selection as shown in the \Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\MultipleRecordSelection, then you should use the second selection technique. This is specific to GridGroupingControl.
To use this second technique, set AllowSelection = none and ListBoxSelectionMode to something other than none.
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;
this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;
To use the first technique, set AllowSelection to something other than none.
ML
Morgan Lord
March 23, 2005 07:08 PM UTC
Thanks for the response.
I don''t need to highlight multiple rows. Just one at a time.
When the control loses focus I need to have the control un-highlight all its rows (In my case just one row)
What is the correct way to do this?
I tried _sfDataGridGrouping.TableControl.Selections.Clear(true);
Thanks.
Morgan
>There are two selection techniques available in GridGroupingControl. One is inherited from GridControlBase through the GridTable object. It allows you to select ranges of cells depending upon the AllowSelection setting.
>
>If you want to use record selection as shown in the \Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\MultipleRecordSelection, then you should use the second selection technique. This is specific to GridGroupingControl.
>
>To use this second technique, set AllowSelection = none and ListBoxSelectionMode to something other than none.
>
>this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;
>this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;
>
>
>To use the first technique, set AllowSelection to something other than none.
AD
Administrator
Syncfusion Team
March 23, 2005 07:37 PM UTC
If you are using the first technique then yes.
If you are using the second technique, then you would this method.
this.gridGroupingControl1.Table.SelectedRecords.Clear();