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.

Gridgroupingcontrol highlight row method

Thread ID:

Created:

Updated:

Platform:

Replies:

124696 Jun 23,2016 02:33 AM Jun 27,2016 12:27 AM Windows Forms 4
loading
Tags: GridGroupingControl
Michael K
Asked On June 23, 2016 02:33 AM

Hi All :
I would like to write a code to force select whole (single) row in the child table or parent table under gridgroupcontrol
That mean user only allow select the row and the mouse cursor will only show a select pointer
Any idea ?
Thanks
Michael

Neelakandan Kannan [Syncfusion]
Replied On June 24, 2016 05:32 AM

Hi Michael, 

Thanks for using Syncfusion products. 

The reported scenario with “Single row selection with hiding the current cell” can be achieved by using the ListBoxSelectionMode and ListBoxSelectionCurrentCellOptions properties. Please make use of the below code,  
 
Code Snippet 
// To enable the Whole row selection. 
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended; 
 
// To hide the currentcell on selecting the row. 
this.gridGroupingControl1.TableOptions.ListBoxSelectionCurrentCellOptions = GridListBoxSelectionCurrentCellOptions.HideCurrentCell; 

Regards, 
Neelakandan 


Michael K
Replied On June 25, 2016 04:48 AM

Hi Neelakandan 

Thanks, it's work, I have one more problem
I find one of column (The cell type is combo box). But the text algh of cell content are always right
Even , I have add a code as below
.TableDescriptor.Columns("column1").Appearance.AnyRecordFieldCell.TextAlign = GridTextAlign.Left

it cannot turn left, how can I solve it ?

Thanks 

Michael


Nicolas
Replied On June 26, 2016 10:25 AM

Maybe you can try this? 
GridGroupingControl1.TableDescriptor.Columns("Column1").Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Left

- Nicolas

Piruthiviraj Malaimelraj [Syncfusion]
Replied On June 27, 2016 12:27 AM

Hi Nicolas, 

Thank you for your update. 

In order to display the text at left side, HorizontalAlignment property can be used. Please make use of below code. 
 
Code snippet 
 
this.gridGroupingControl1.TableDescriptor.Columns["Description"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.ComboBox; 
 
this.gridGroupingControl1.TableDescriptor.Columns["Description"].Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Left; 

UG Document link 
 
Regards, 
Piruthiviraj 


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.

;