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.

Border for the row selected in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

30687 Jun 22,2005 02:38 AM Jun 23,2005 05:28 AM Windows Forms 5
loading
Tags: GridControl
Prathima Venkobachar
Asked On June 22, 2005 02:38 AM

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 03:41 AM

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 05:29 AM

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 07:35 AM

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 03:52 AM

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 05:28 AM

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

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.

;