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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Click cell select all

Thread ID:

Created:

Updated:

Platform:

Replies:

47333 Aug 2,2006 07:33 PM UTC Aug 3,2006 01:07 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 2, 2006 07:33 PM UTC

Hi,

I have a gridcontrol with one column editable. I would like to select all inside the cell whenever the user click cell. So I can garantee the user will change the whole value, but not adding numbers in between by accident.

Is there a way to do it?
Thanks a log

Chris

Administrator [Syncfusion]
Replied On August 3, 2006 04:40 AM UTC

Hi Chris,

Set the ActivateCurrentCellBehavior property of the grid to GridCellActivateAction.SelectAll, this will help you to select all text when ever a cell becomes current cell.

this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

To avoid the numbers being entered, the CurrentCellKeyPress event can be handled to do it. Below is the code snippet.

if(char.IsDigit(e.KeyChar))
{
e.Handled = true;
}

Thanks for using Syncfusion Products.
Regards,
Rajagopal

Administrator [Syncfusion]
Replied On August 3, 2006 01:07 PM UTC


work perfectly. thanks a lot
>Hi Chris,

Set the ActivateCurrentCellBehavior property of the grid to GridCellActivateAction.SelectAll, this will help you to select all text when ever a cell becomes current cell.

this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

To avoid the numbers being entered, the CurrentCellKeyPress event can be handled to do it. Below is the code snippet.

if(char.IsDigit(e.KeyChar))
{
e.Handled = true;
}

Thanks for using Syncfusion Products.
Regards,
Rajagopal

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.

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

;