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.

Cell text caret/cursor moves on a grid Refresh in non-edit mode

Thread ID:

Created:

Updated:

Platform:

Replies:

57536 Mar 6,2007 06:09 AM Mar 6,2007 12:45 PM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 6, 2007 06:09 AM

The default behaviour of the Syncfusion grid is to show a text cursor in the cell you click on - you can position the cursor within some text without actually going into edit mode.

However, if the grid refreshes (say a timer has fired and calls grid.Refresh()) then the cursor moves to the beginning of the text.

What this means is if the user wants to position the cursor and then start typing, if a refresh occurs before they start typing they will enter text at the wrong place.

Are there any properties I can set to change this behaviour or methods to override so the text cursor doesn't move around. Otherwise, we'll have to prevent the cursor from showing (maybe using the ActivateCurrentCellBehavior property) unless the user actually enters Edit mode.

Thanks.

Administrator [Syncfusion]
Replied On March 6, 2007 12:45 PM

Hi jas_sl,

This a default behavior. But one way you can keep the current cell cursor by calling the refresh method between the GetEditState and SetEditState method. Here is a code snippet

//Form.Load event.
button1.CausesValidation = true;

//button1.Click event.
object editObject = this.grid.CurrentCell.Renderer.GetEditState();
this.grid.Refresh();
this.grid.Focus();
this.grid.CurrentCell.Renderer.SetEditState(editObject);

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.

;