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. Image for the cookie policy date

Gridgroupingcontrol highlight row method

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

4 Replies

NK Neelakandan Kannan Syncfusion Team June 24, 2016 09:32 AM UTC

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 



MK Michael K June 25, 2016 08:48 AM UTC

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



NI Nicolas June 26, 2016 02:25 PM UTC

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

- Nicolas


PM Piruthiviraj Malaimelraj Syncfusion Team June 27, 2016 04:27 AM UTC

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 


Loader.
Live Chat Icon For mobile
Up arrow icon