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 the cursor position in a Date cell type on Cell focus


Hi,

I have a grid control that has a column which is a Date (MaskEdit type).  (It has this mask "  /  /    "); 

I want to set the cursor to start always from the right side of the control whenever a user clicks on the cell.

Is there a way to do so ?

(I tried catching the "CurrentCellControlGotFocus" and tried to change the Cursors position or something like that but its not possible.

Also tried changing the "Right to left" property but that doesnt make the cursor jump to the right.

Thanks,

Roy.

5 Replies

NK Neelakandan Kannan Syncfusion Team March 9, 2015 08:06 PM UTC

Hi Roy,

Thank you for your interest in Syncfusion products.

We regret to let you know that this is the default behavior of the Grid cell. The cursor position will be placed based on the cursor focused in the textbox. For example, if you focus the grid cell by clicking the initial point of grid cell, the focus will be moved to first position while focusing the grid cell. So please ensure that this is the default behavior of grid cell.

Please let me know if you have any concerns.

Regards,

Neelakandan




RO Roy March 10, 2015 11:57 AM UTC

Ok ,

We seemed to have found a way to do that using SendKeys.Send("{home}");

Thank you,

roy


SA Solai A L Syncfusion Team March 11, 2015 08:00 PM UTC

Hi Roy,

 

Thank you for your update.

 

We are glad know that your issue has been resolved. Please let us know if you need any further assistance.

 

Please let us know if you have any other concerns.

 

Thanks & Regards,

AL.Solai.



TK Tomer Klein March 15, 2015 05:05 PM UTC

Hi,
using this :
  private void bizBasicGridControl2_CurrentCellActivated_1(object sender, EventArgs e)
        {
            SendKeys.Send("{home}");
        }

solved it for me.
the problem using CurrentCellVontrolGotFocus was that this event fired in loop while the cursur was in the cell.

CurrentCellActivated fired only once when i entered the cell.


SA Solai A L Syncfusion Team March 16, 2015 09:57 PM UTC

Hi Tomer,

Thank you for your interest in Syncfusion Products.

If you want the event to get triggered when the cell is begins to edit mode, you can use CurrentCellStartEditing. And use of QueryCellStyleInfo would get triggered frequently while drawing each cell of the grid. Could you please let us know the exact scenario in which you want the event to get triggered? So, that it would be easy for us to provide a prompt solution.

 

Please let us know if you have any other concerns.

 

Thanks & Regards,

AL.Solai.

 

 


Loader.
Live Chat Icon For mobile
Up arrow icon