The function CanEnterEditMode returns true for cells with activation mode set to ActivateOnly which is not the expecting behavior unless i am misunderstanding the edit mode definition.
the function internal bool CanCellEnterEditMode(UltraGridRow row, bool isEnteringFromTemplate) uses
return Activation.Disabled != activationResolved && Activation.NoEdit != activationResolved;
I think it should be
return Activation.AllowEdit == activationResolved;
because AllowEdit is the only mode allowing the edition of the cell.
Regards,
Bneoit Hay
If you are dealing with a single cell, be sure to use the cell's ActivationResolved property. This will take into account the cell, column, and row settings.
Thank you for quick answer and clear explanation !
I have some code updates to perform now :) (using cell activation rather than canEnterEditMode)
Hi Benoit,
This is correct behavior.
ActivateOnly DOES allow the cell to enter edit mode. You can see this when you click the cell and you get a caret. You can select text and perform a copy operation. The only thing you cannot do is actually edit the text.
In this case, EditMode is something of a misleading term. Edit mode means that the cells editor goes into edit mode - which it is. It's in edit mode, but it doesn't allow editing. It's a very fine distinction and to be honest, these property names probably weren't as well thought-out as they should have been.
If we made the change you suggest, it would not be possible to select text or copy from the cell.
This is the CanEnterEditMode method of the UltraGridCell class in the Ingragistics.Win.UltraWinGrid Namesapace.
http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.UltraGridCell~CanEnterEditMode.html
Hi,
Is this Windows Forms UltraGrid or another platform/control?