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.
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,
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();
Hi Benji,
I took a look at the attached sample. So, the problem in the sample is that even if the validation fails, the wrong value is being set in property's setter. So undoing the change and restoring the original value afterwards is not possible, as the original value is already lost.
I modified the sample to make it work: the new value is set only if validation passes. You can find the modified sample attached.
Hope this helps,
Here is the screenshot.
I just got the newest Service Release, and the issue is still present. I have attached an image of the properties for our infragistics dll, and I have also included your GridSample project with the code setup to show you how it fails.
We are using 2279, and are still having these issues.