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

How to position cursor inside a cell

Thread ID:





41315 Feb 27,2006 09:01 PM UTC Mar 2,2006 04:31 PM UTC WinForms 2
Tags: GridControl
Asked On February 27, 2006 09:01 PM UTC

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 28, 2006 03:53 AM UTC

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

Replied On March 2, 2006 04:31 PM UTC

This works fine, Thanks


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

or the page will be automatically redirected to 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