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
close icon

Border for the row selected in GridGroupingControl

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

5 Replies

AD Administrator Syncfusion Team 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;

PV Prathima Venkobachar 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

AD Administrator Syncfusion Team 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);

PV Prathima Venkobachar 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

AD Administrator Syncfusion Team June 23, 2005 09:28 AM UTC

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

Live Chat Icon For mobile
Up arrow icon