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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selection of any cell should highlight entire row.

Thread ID:

Created:

Updated:

Platform:

Replies:

106072 Dec 7,2012 04:28 PM UTC Dec 11,2012 11:52 AM UTC WinForms 3
loading
Tags: GridControl
Gaukhar Massabayeva
Asked On December 7, 2012 04:28 PM UTC

How can this be accomplished in GridGroupingControl?

Vinish Kumar K [Syncfusion]
Replied On December 10, 2012 04:47 AM UTC

 Hi Gaukhar Massabayeva,

Thank you for your interested in Syncfusion products.

Query.

Highlighting any row while selecting a cell

You can achieve this functionality using the ListBoxSelectionMode property. Please refer the following codes which are used for your reference.

 

this.gridGroupingControl1.TableOptions.ListBoxSelectionMode =SelectionMode.MultiSimple;

           this.gridGroupingControl1.TableOptions.ListBoxSelectionColorOptions = GridListBoxSelectionColorOptions.ApplySelectionColor;

            this.gridGroupingControl1.TableOptions.AllowSelection =GridSelectionFlags.AlphaBlend;

 

Please refer the following UG Link  also. It will helps to you to get more details about this property, 

UG Link :  http://help.syncfusion.com/UG/User%20Interface/Windows%20Forms/Grid/default.htm#!Documents/selectedrangescollection.htm

Please let me know if you have further concerns.

Note : Already you have created duplicated forum for this Query ( 106067) Please follow up any one of query.

Regards,

Vinish.


Gaukhar Massabayeva
Replied On December 10, 2012 12:06 PM UTC

Thank you Vinish.
 
You solution works.
 
However it is now conflicting with the current settings in the grid.
 
After implementing your suggestions. I no longer can select certain cells and rows, without the whole row being selected.
 
For example:
 
I want to select only the middle section of my grid
 

 

 

 

 

 

 

 

             

 

 

 

 

 
but instead it enforces selection of the whole row:
 

 

 

 

 

 

 

 

 

 

 

 

 

 
 
I tried Focused Selection but e.Style is missing AlphaBlend property that I need.
Please be so kind to share your expertise in solving this. Thank you

Vinish Kumar K [Syncfusion]
Replied On December 11, 2012 11:52 AM UTC

Hi  Gaukhar Massabayeva,

 

Thanks for your update.

 

Query

Middle Selection

We have analysis your last update. If you want to select the middle cells of current row while clicking use the Current cell start editing event.

 

We have implement MidSelection property for your requirement. Please refer the following codes.

 

Please enable the MidSelection property in form load.

 

void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)

        {

            GridCurrentCell c = this.gridGroupingControl1.TableControl.CurrentCell;

            if (midselection == true && c.ColIndex > 0 && c.RowIndex > 2)

            {

                this.gridGroupingControl1.TableControl.Selections.Clear();

                int colCount = this.gridGroupingControl1.TableDescriptor.Columns.Count;

                int midCol = colCount / 2;

                if(colCount%2==1)

                    this.gridGroupingControl1.TableControl.Selections.Add(GridRangeInfo.Cell(c.RowIndex,midCol+1));

                else

                this.gridGroupingControl1.TableControl.Selections.Add(GridRangeInfo.Cells(c.RowIndex, midCol, c.RowIndex, midCol + 1));

            }

        }

 

Please refer the attached sample also it will helps to you for further analysis.

 

Please let me know if you have further concerns.

 

Regards,

Vinish.

 



MidSelection_207e5af3.zip

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.

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

;