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

Border for the row selected in GridGroupingControl

Thread ID:





30687 Jun 22,2005 06:38 AM UTC Jun 23,2005 09:28 AM UTC WinForms 5
Tags: GridControl
Prathima Venkobachar
Asked On June 22, 2005 06:38 AM UTC

Hi, In GridGroupingControl when I select a row, I want a border for the entire row.Can I get this...? Thanks, Prathima

Administrator [Syncfusion]
Replied On June 22, 2005 07:41 AM UTC

Is it that you want the whole row selected when you click a cell? If so, try setting these properties: this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One; this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;

Prathima Venkobachar
Replied On June 22, 2005 09:29 AM UTC

This code works fine, but I don''t want the default system selection backcolor.I want only the border for the row, not the back color. Thanks, Prathima

Administrator [Syncfusion]
Replied On June 22, 2005 11:35 AM UTC

Try this. Turn off the default currentcell frame. this.gridGroupingControl1.TableModel.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways; Then handle the TableControlPrepareViewStyleInfo event.
private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
	GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
	if(style.TableCellIdentity.TableCellType != GridTableCellType.RecordFieldCell
		&& style.TableCellIdentity.TableCellType != GridTableCellType.AlternateRecordFieldCell
		|| (style.TableCellIdentity.DisplayElement.ParentRecord == e.TableControl.Table.CurrentRecord))
		e.Inner.Style.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, Color.Red);
		e.Inner.Style.Borders.Top = new GridBorder(GridBorderStyle.Solid, Color.Red);

Prathima Venkobachar
Replied On June 23, 2005 07:52 AM UTC

Hi, Thanks, this works fine. In this scenario how do i copy that selected row using ctrl+C I want to copy that selected row using ctrl+C .If I use key board this is not working. Do I need to do any extra coding..? Thanks, Prathima

Administrator [Syncfusion]
Replied On June 23, 2005 09:28 AM UTC

See this thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=30745


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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