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

Autoselect first row in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

117293 Sep 24,2014 06:14 PM UTC Sep 28,2014 06:23 PM UTC WinForms 1
loading
Tags: GridGroupingControl
Gustavo Montano
Asked On September 24, 2014 06:14 PM UTC

Hi

I have a GridGroupingControl and I want to auto select the first row of the data in the grid.

I have tried some similar examples from other posts in the fórum but I do not get the first row selected

I have used this code:

Record rec = clientGridControl.Table.Records[0];

int rowIndex = clientGridControl.Table.DisplayElements.IndexOf(rec);

clientGridControl.TableControl.CurrentCell.MoveTo(rowIndex, 1, GridSetCurrentCellOptions.ScrollInView);

But I do not see the first row highlighted.

Hope you can help me


Muthukumar Kalyanasundaram [Syncfusion]
Replied On September 28, 2014 06:23 PM UTC

Hi Gustavo,

 

Thank you for your interest in Syncfusion products.

 

If you want to highlight the particular row of the data in GridGroupingControl, you can use the “Selection” property. Please refer the below code,

 

Code Snippet:

            Record rec = this.gridGroupingControl1.Table.Records[0];           

            this.gridGroupingControl1.TableModel.Selections.Add(GridRangeInfo.Row(rec.GetRowIndex()));          

            int rowIndex = gridGroupingControl1.Table.DisplayElements.IndexOf(rec);

            this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(rowIndex, 1, GridSetCurrentCellOptions.ScrollInView); 

 

Please let us if you have any concern.

 

Regards,

Muthukumar K


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

;