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.

Change cell selection border for static or disabled cells/records

Thread ID:

Created:

Updated:

Platform:

Replies:

49873 Sep 28,2006 04:28 PM Sep 29,2006 01:53 AM Windows Forms 1
loading
Tags: Grouping
jamesb
Asked On September 28, 2006 04:28 PM

The default cell selection border for active cell is a black border.

Is there a way, either thru conditional format or querycellstyleinfo to maybe automatically change the border to gray at runtime so that users know that the cell is not editable or whatever?

Administrator [Syncfusion]
Replied On September 29, 2006 01:53 AM

Hi James,

Use the TableOptions.ListBoxSelectionOutlineBorder property to specify a border that should be drawn around a block of selected records. Also handle the TableControlPrepareviewStyleInfo event to set the border style of the currentCell in a grid.

//Set the border style of selected records.
this.grid.TableOptions.ListBoxSelectionOutlineBorder = new GridBorder(GridBorderStyle.Solid, Color.Red, GridBorderWeight.Medium);

private void gridTableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridGroupingControl grid = sender as GridGroupingControl;
GridTableControl tc = e.TableControl;
GridCurrentCell cc = tc.CurrentCell;

if( e.Inner.RowIndex == cc.RowIndex && e.Inner.ColIndex == cc.ColIndex )
{
e.Inner.Style.Borders.All = grid.TableOptions.ListBoxSelectionOutlineBorder;
}
}

Sample: http://www.syncfusion.com/Support/user/uploads/SelectionBorderColor_beba6b.zip

Best Regards,
Haneef

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.

;