How to position cursor inside a cell

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?

2 Replies

ST stanleyj Syncfusion Team 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


KI Kingsley March 2, 2006 04:31 PM UTC

This works fine, Thanks

Loader.
Up arrow icon