Hello,
I tried to make xamGrid display a list of structures, one of the fields of which is validated using IDataErrorInfo's indexer (just like the example in xamFeatureBrowser), but I've added an Add New Record row at the top.
The problem is, when the user starts creating the new row, the cell is instantly validated before the user has entered anything and is highlighted with a red border. Is there any way to make the validation occur only when he tries to save the records? It is very annoying to get the error message before even having a chance to enter any value.
Hello Anton,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
The sample you provided doesn't address the question.
You're welcome Stefan.
In fact, it's even better to just toggle the DataErrorDisplayMode in RecordUpdating, since changing the setting in RecordActivating/ed causes an extra mouseclick to get things resolved for editing.
Hello Darryl,
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.
Since most implementations of IDataErrorInfo behave this way, what I did was set DataErrorDisplayMode = None in RecordActivating when IsAddRecord, and then turn it on in RecordUpdating. I thought this a simple workaround for something that annoyed me for a while.