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.
Here is a piece of Silverlight Generated code from Ria Services. Are you telling me that I can't user my server validation with your grid?
Notice how they do the Validation Check just as I did in the Sample I sent back to you.
I just re-tested the grid which bound to this. The generated validate property returns a void. I am not writing my own validation, this is coming over the wire through generated code.
[DataMember()]
[MinimumValue(((double)(0D)))]
public double QuantityOrdered
{
get
return this._quantityOrdered;
}
set
if ((this._quantityOrdered != value))
this.OnQuantityOrderedChanging(value);
this.RaiseDataMemberChanging("QuantityOrdered");
this.ValidateProperty("QuantityOrdered", value);
this._quantityOrdered = value;
this.RaiseDataMemberChanged("QuantityOrdered");
this.OnQuantityOrderedChanged();
RIA is different, as there's a client-side object that represents the data, but the actual data is server-side. So, even if wrong value is set on the client-side, validation will not allow it to be set on the actual server-side data. And the client-side value can be discarded afterwards, as the old value still persists on the server.
As I noted in one of my previous posts, I tested this out with RIA services and it was working correctly. Do you see an issue when using RIA services?
Regards,
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.
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.
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.