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

Change cell selection border for static or disabled cells/records

Thread ID:





49873 Sep 28,2006 08:28 PM UTC Sep 29,2006 05:53 AM UTC WinForms 1
Tags: Grouping
Asked On September 28, 2006 08:28 PM UTC

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 05:53 AM UTC

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,


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