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.
Unfortunately, activation email could not send to your email. Please try again.

allow editing the cell only when double click

Thread ID:

Created:

Updated:

Platform:

Replies:

65067 Jul 24,2007 11:17 PM Jul 25,2007 03:10 PM Windows Forms 1
loading
Tags: GridControl
Jasper Tam
Asked On July 24, 2007 11:17 PM

Hi Sir/Madem,

I have a GridDataBoundGrid and would like to allow editing the cell only when user double click on the cell.

I had set ActivateCurrentCellBehavior to DblClickOnCell but seems that the current cell can always allow to be edited.

Are there any solution on this. Pls advice.

Regards,
Jasper

haneefm [Syncfusion]
Replied On July 25, 2007 03:10 PM

Hi Jasper,

You can try these code:

bool IsDoubleClick = false;
void gridDataBoundGrid1_CellDoubleClick(object sender, GridCellClickEventArgs e)
{
IsDoubleClick = true;
}
void gridDataBoundGrid1_CurrentCellStartEditing(object sender, CancelEventArgs e)
{
if (!IsDoubleClick)
e.Cancel = true;
else
IsDoubleClick = false;
}

Best regards,
Haneef

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.

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.

;