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

MaskEdit question

Thread ID:

Created:

Updated:

Platform:

Replies:

11587 Mar 10,2004 07:05 PM UTC Mar 11,2004 04:44 PM UTC WinForms 3
loading
Tags: GridControl
Patrick
Asked On March 10, 2004 07:05 PM UTC

I have a virtual grid that has the ActivateCurrentCellBehavior set to DblClickOnCell. However, when I make some of the cell to a MaskEdit CellType in the QueryCellInfo(..), than whenever I single click on the grid, the cell automatic turn into edit mode. Can any one suggest a way to prevent the cell goes into edit mode?

Administrator [Syncfusion]
Replied On March 10, 2004 07:53 PM UTC

This behavior has been changed in the 2.0 code base so this shoul dnot be a problem in 2.0. In 1.6.1.8, if you don''t want to see the MaskEdit active, you can handle the CurrentCellStartEditing event and cancel it. But this would never let it be active. If you want to be able to activate it on a DoubleClick, then you would have to set some flag to allow this. Here are some code snippets.
bool okToStartEditing = false;
private void gridControl1_CurrentCellStartEditing(object sender, ComponentModel.CancelEventArgs e)
{
	if(!okToStartEditing)
		e.Cancel = true;
	okToStartEditing = false;
}

private void gridControl1_DoubleClick(object sender, System.EventArgs e)
{
	okToStartEditing = true;
	this.gridControl1.CurrentCell.BeginEdit();
}

Patrick
Replied On March 11, 2004 04:07 PM UTC

I am using 2.0.2.1 beta version and I see the current cell goes into edit mode if I use the arrow key to navigate to a cell.

Administrator [Syncfusion]
Replied On March 11, 2004 04:44 PM UTC

This fix was made after 2.0.2.1. In the code I am running, the maskedit cell does not active on a click if you have the activation set to doubleclick.

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

;