We just recently updated to version 10.3, and I seem to have run into a bug between the two versions. When I attempt to force an editing cancel on the active cell on a grid while there is a validation error the method doesn't cancel the edit.
Here is what I call on each of the grids:
// clear out changes from grids
this.dgItemsByLocation.ExitEditMode(true);
And this fails to clear the grid entry, and when I attempt this command in the debug it returns false from the method. Has the ability to cancel entries in the grid been disabled.
See the Screen Shot for a display of the grid after the ExitEditMode is called. It retains the invalid value, and fails to exit the edit mode.
This is very important to my current project, and I need to know if this bug has been fixed in the newest version of XamGrid, or what I can do to fix this in my project because I'm working with new validation for our system.
BUMP.
I need to know if this is fixed.
Hi Benji,
I tried to reproduce your issue but without success. Could you give some more details: which build are you using and what are the specific steps to reproduce the issue? Where do you call ExitEditMode ? It'd be nice if you could attach a small sample that demonstrates the issue.
Regards,
As stated above I'm using 10.3. I have a grid in my view, and I'm calling the ExitEditMode(true) from the code behind.
Just like this: this.dgitems.ExitEditMode(true);
So that it cancels the edit. But the problem is that if the cell has a validation error it won't exit the edit mode and cancel the edit. What more code would you like? Because this is just a standard IG grid, and I'm directly referencing it from the code behind. I don't know what more to tell you, but that it isn't working.
The object that is bound to the grid is from the Domain Service, and has validation attributes for several of the properties, which are the ones having the problem.
I have removed all of my own code around it and it still happens. What more can I tell you?
Hi,
Could you specify exactly which 10.3 build you're using ? You can see that in VS Properties window when you select the corresponding assembly:
Also, could you try the attached sample and see if it works for you? Just run the app (preferably without debugging), enter edit mode on a cell in the "Int" column, type a value greater than 1000, and try to exit edit mode when a validation error is displayed by clicking the button.
The attached application uses pretty basic validation with exception being thrown in the setter of underlying object's property, but I also tested this with Domain Data Source and validation attributes (Range attribute, to be more specific) and it was also working correctly.
Hope this helps,
The version we have is 10.3.20103.1006
I tested your application you attached, and the Exception that was thrown was properly handled when cancelled, but when I added the Range attribute to it, and the INotifyDataErrorInfo, and actually validated it that way it did the same thing I'm having problems with. So it seems the issue is caused by using a Validation Result rather than an exception.
I have attached an image showing what it looked like after I added the range attribute, and hit the exit edit mode button you have on there.
I think I've managed to reproduce your issue using the Range attribute with build 10.3.1006. Looks like there was a bug that was fixed a while ago. It worked correctly when I tested this with the latest Service Release (10.3.2279).
So upgrading to the latest SR version should fix the issue.
Hello Benji,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
My team was able to figure out that the reason this was causing issues was because the validation check was outside of the if-then statement which determines if there was a change in value. I will let you know if we run into any other issues with this.
Thank you.
Ok, so after I got back this week I found an issue within our implementation of the XamGrid which was causing the RIA services objects to not properly work with the ExitEditMode.
The issue now is that our extension objects on the client side are not working as they should with the grid. I have created a new project for testing this issue, and I have included our DLL files, and the projects reference them. Use the TestInt column to do the testing, that property is the one having the issue.
I hope this helps to find the issue. This worked in 10.2 by the way, and that is why i'm having the issues.
The project is linked too because it was too large compressed to be uploaded.
Thanks.
Have you had a chance to look into this again? I still have a large project waiting for this to be fixed.
Yes, as stated above this problem continues with RIA data objects which is what I'm binding to my grids. I suggest testing this with my version, as I believe the time you tested the RIA binding was before you knew which version I have.