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.

ExcelLikeSelectionFrame - change format

Thread ID:

Created:

Updated:

Platform:

Replies:

39655 Jan 14,2006 12:50 AM Jan 16,2006 01:14 AM Windows Forms 1
loading
Tags: GridControl
va
Asked On January 14, 2006 12:50 AM

I have a GridControl that can be selected by row only. I want to have the ExcelLikeSelectionFrame show a dotted rectangle around the current row - not that thick rectangle. Is there another property I can set o can I format the excel selection frame differently?

stanleyj [Syncfusion]
Replied On January 16, 2006 01:14 AM

Hi Va, The easier way that can be done is to draw the borders in the PrepareViewStyleInfo handler. private void gridControl1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e) { GridControlBase grid = gridControl1; GridCurrentCell cc = grid.CurrentCell; if (e.RowIndex > grid.Model.Rows.HeaderCount && e.ColIndex > grid.Model.Cols.HeaderCount && cc.HasCurrentCellAt(e.RowIndex)) { e.Style.Borders.Top = new GridBorder(GridBorderStyle.Dashed, Color.Black, GridBorderWeight.Medium); e.Style.Borders.Bottom = new GridBorder(GridBorderStyle.Dashed, Color.Black, GridBorderWeight.Thick); } } Also turn RefreshCurrentCellBehavior to RefreshRow. this.gridControl1.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow; this.gridControl1.ListBoxSelectionMode = SelectionMode.One; For more details refer sample in \Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\Quick Start\HighlightCurrentRow.(also available in earlier versions) Best regards, Stanley

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.

;