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. Image for the cookie policy date

Setting Cursor Position in Cell

I have a maskedit cell to format a phone number in a grid (''(999) 999-9999). When I click in the phone column my cursor position is set to the spot I click. Also, if a user tabs to the cell, I want focus after the first paren. I tried using currentcellactivated then setting the position using: Me.grdPhone.ActivateCurrentCellBehavior = GridCellActivateAction.PositionCaret = 1

But it either never lets me leave position 1 or otherwise locks up the cell (can''t tell).

Thanks!

1 Reply

AD Administrator Syncfusion Team July 31, 2006 05:07 AM UTC

Hi Tom,

You could do this by handling the GotFocus Event of the GridMaskedEditBox control. Please refer to attached sample, that helps you to set the cursor at first position.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/MaksGrid_1d5dd3ab.zip

Let me know if this helps.
Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon