This question is locked. New answers and comments are not allowed.
Hi,
Using Q1 2012, and RIA services. I bind a EntityCollectionView to the RadGridView and allow the user to add new rows using the built in functionality. Everything works fine under normal use. The entity has a mandatory first field, so when the user clicks to add a new row immediately the first field is in error and the row is marked in error. If the user then tries to submit changes using a save buttom outside the grid, it doesn't work and none of my code is executed as the row is in error. This is good and again no problem up to here. The user can repeatedly try to click save and nothing happens (which is correct), however if the user clicks the save button very fast, like a double click, the save code is executed for some reason and of course when submitchanges is executed on the RIA context you get this exception as the row is still in edit. Note that I have no double click code defined and this is the stack trace:
at System.ServiceModel.DomainServices.Client.Entity.VerifyNotEditing()
at System.ServiceModel.DomainServices.Client.EntityChangeSet.Validate(ValidationContext validationContext)
at System.ServiceModel.DomainServices.Client.DomainContext.ValidateChangeSet(EntityChangeSet changeSet, ValidationContext validationContext)
at System.ServiceModel.DomainServices.Client.DomainContext.SubmitChanges(Action`1 callback, Object userState)
at TheHub.Silverlight.Commands.SaveCommand.Execute(Object parameter)
Please could you explain what the mechanism is that prevents the save button's command Execute method being called when a row in the grid is in error as this may explain why double clicking the button somehow bypasses this mechanism?
Thanks,
Scott
Using Q1 2012, and RIA services. I bind a EntityCollectionView to the RadGridView and allow the user to add new rows using the built in functionality. Everything works fine under normal use. The entity has a mandatory first field, so when the user clicks to add a new row immediately the first field is in error and the row is marked in error. If the user then tries to submit changes using a save buttom outside the grid, it doesn't work and none of my code is executed as the row is in error. This is good and again no problem up to here. The user can repeatedly try to click save and nothing happens (which is correct), however if the user clicks the save button very fast, like a double click, the save code is executed for some reason and of course when submitchanges is executed on the RIA context you get this exception as the row is still in edit. Note that I have no double click code defined and this is the stack trace:
at System.ServiceModel.DomainServices.Client.Entity.VerifyNotEditing()
at System.ServiceModel.DomainServices.Client.EntityChangeSet.Validate(ValidationContext validationContext)
at System.ServiceModel.DomainServices.Client.DomainContext.ValidateChangeSet(EntityChangeSet changeSet, ValidationContext validationContext)
at System.ServiceModel.DomainServices.Client.DomainContext.SubmitChanges(Action`1 callback, Object userState)
at TheHub.Silverlight.Commands.SaveCommand.Execute(Object parameter)
Please could you explain what the mechanism is that prevents the save button's command Execute method being called when a row in the grid is in error as this may explain why double clicking the button somehow bypasses this mechanism?
Thanks,
Scott