Hello Devexpress,
We are seeing some breaking changes on RepositoryItemButtonEdit after upgrading to 15.1.4 from 14.1.7
Validating event on RepositoryItemButtonEdit is getting called twice if you type and tab out from control. I have attached sample Please try running it on 14.1.7 and 15.1.4.
Change Property 3 and tab out you will see two instance of xtraform for 15.1.4 where once instance in 14.1.7.
-Amit
Hello Amit,
Thank you for your sample project. I've successfully reproduced the described behavior and passed this ticket to our developers for additional research. Please watch for our updates.
Meanwhile, you can use the following workaround: create a PropertyGridControl descendant and override the PropertyGridControl.OnActiveEditor_LostFocus method as follows:
protected override void OnActiveEditor_LostFocus(object sender, EventArgs e) { if(ContainerHelper.InternalFocusLock != 0 || (ActiveEditor != null && ActiveEditor.EditorContainsFocus) || ActiveEditor is PopupContainerEdit) return; OnLostFocus(e); PostEditor(false); }
I've modified your project to show this approach in action.
Hello Andre,
The issue occurs in VGridControl as well, can same solution be applied to VGridControl also?
Is this fixed in v15.1.7?
Thanks,
Narendra Chavda
Hello Narendra,
Yes, the same solution can be applied to VGridControl because the OnActiveEditor_LostFocus method is implemented in the VGridControlBase class, which is the base class for VGridControl and PropertyControl.
I must say though that the issue has not been fixed yet in version 15.1.7. I see that you've added this ticket to your Favorites, so you'll receive an email notification from the Support Center once the issue is fixed. Let me know if you have additional questions.
Ok, thanks for the quick response!!
Thanks,
Narendra Chavda
Hi André ,
This change has caused us regression. We have property grid, instead of lookup edit repository item we have normal edit.
If won’t tab out from cell after changing value the cell is not posting value back. This is very serious issue.
Please let me know your feedback as we are few days away from shipping our application.
-Amit
Hello Amit,
Please clarify what you mean by saying that This change has caused us regression - the suggested workaround or the breaking change in our controls.
Anyway, our developers are working on your issue, and they will do their best to resolve it as soon as possible. Although I cannot guarantee an immediate fix, I'll personally look into this issue.
The suggested change i mean.
André,
We are relying heavily on propertyGridControl1_ValidatingEditor for some other stuff.
Looks like we are suppressing this event with workaround you have provided. Please look into modified sample. Please test with/without the work around you have suggested.
-Amit
Hello Amit,
Yes, you are right, the PostEditor(false) method call doesn't raise the ValidatingEditor event. At the moment, it's difficult to suggest a better solution than waiting for a fix. I've informed our developers about the urgency of this issue. However, preparing the fix will take some time. Your patience is greatly appreciated.
Andre,
This is showstopper for one of core workflow as well for release. hope you understand?
Hello Amit,
Yes, I completely understand that the issue is critical for you. Our developers are already looking for a solution.
Once it's ready, you are welcome to request the fix immediately and we will prepare an intermediate build containing the fix for you: How to request a hotfix.
In the meantime, consider using the following code in the PropertyGridControl.OnActiveEditor_LostFocus method:
protected override void OnActiveEditor_LostFocus(object sender, EventArgs e) { if(ContainerHelper.InternalFocusLock != 0 || (ActiveEditor != null && ActiveEditor.EditorContainsFocus) || ActiveEditor is PopupContainerEdit) return; OnLostFocus(e); PostEditor(IsClosingEditor ? false : true); }
I've tested this code with your project and it appears to work correctly. Please try it and let me know your results.
Just wondering this is not final fix as we are still getting some issues with this suggestion.
Hello Amit,
This workaround is just a temporary solution to this issue while you are waiting for a hotfix. It's not a part of our internal source code and you need to delete this overridden method from your code once the hotfix is ready.