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.

How to clear cell focus rectangle or reset current cell

Thread ID:

Created:

Updated:

Platform:

Replies:

55076 Jan 23,2007 01:41 PM May 8,2007 06:42 PM Windows Forms 5
loading
Tags: Grouping
James Blibo
Asked On January 23, 2007 01:41 PM

in the ggc when you navigate to a cell, the focus rectangle is shown around the cell that in essence is the CurrentCell.

How can I reset the current cell and remove the focus rectangle in code?

Administrator [Syncfusion]
Replied On January 23, 2007 02:09 PM

Hi James,

Thanks for being patience.

Please try using the following code snippet to hide the focus around the current cell.
>>>>>>>>>>>>>>>>>
this.gridGroupingControl1.TableModel.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;
>>>>>>>>>>>>>>>>>

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,
Madhan

James Blibo
Replied On January 23, 2007 06:37 PM

This doesn't solve my issue. Your solution is sort of like a global grid setting to control the behavior of the selection.

What I really need to do is to reset the current cell. However, it seems that once a current cell is set my clicking in a cell on the grid, there's no easy way to 'reset' the current cell so that 'no cell is the current cell'.

Basically, I want to get the ggc in its initial state, when there was presviously no current cell until the user clicks into a cell.

Administrator [Syncfusion]
Replied On January 24, 2007 05:50 AM

Hi James,

Thank you for being patience.

You can use the MoveTo method of the CurrentCell to achieve the intend behavior. The following is the code snippet
>>>>>>>>>>>>>>>>>>>>>>>>
// moving the focus, above the record rows.
this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(3,0);
>>>>>>>>>>>>>>>>>>>>>>>>

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,
Madhan

James Blibo
Replied On May 7, 2007 03:56 PM

This snippet works fine, but the focus rectangle is still on the old cell, other the caret had been move to a new cell.

Rajagopal [Syncfusion]
Replied On May 8, 2007 06:42 PM

Hi James,

If you dont want the active currentcell at any particular instance, use the below code. This will help you.

this.gridGroupingControl1.TableControl.CurrentCell.Deactivate(true);

Thanks,
Rajagopal

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.

;