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 position cursor inside a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

41315 Feb 27,2006 04:01 PM Mar 2,2006 11:31 AM Windows Forms 2
loading
Tags: GridControl
Kingsley
Asked On February 27, 2006 04:01 PM

After setting format (e.g. 999) for a column, whenever a new row is added and the cell on the formatted column is activated, the cursor is always at the end of the cell ie. cursor is palced after third blank space within the cell. Please, how can I reposition the cursor to the begining of text within the cell?

stanleyj [Syncfusion]
Replied On February 27, 2006 10:53 PM

Hi Kingsley, If you are working on MaskEdit cell type and need the editing cursor at the start when clicking that cell, then try this to position the blinking cursor. GridCurrentCell cc; private void gridDataBoundGrid1_CurrentCellStartEditing(object sender, System.ComponentModel.CancelEventArgs e) { cc = this.gridDataBoundGrid1.CurrentCell; if(this.gridDataBoundGrid1.Model[cc.RowIndex, cc.ColIndex].CellType == "MaskEdit") { SendKeys.Send("{HOME}"); SendKeys.Send("{RIGHT}");//if needed } } Let me know if your requirement is different. Best regards, Stanley

Kingsley
Replied On March 2, 2006 11:31 AM

This works fine, Thanks

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.

;