If my domain objects implement IDataErrorInfo, and I am using M-V-VM, how do I propagate errors through the ViewModel into the View? If i was binding directly to the model, I would set the "ValidateOnExceptons" and "ValidateOnErrors" properties to true on my binding. But my ViewModel doesn't implement IDataErrorInfo. Only my model. What ...
I keep noticing that IDataErrorInfo usage slows my software. When I type text in an TextBox, the text seems to lag behind a bit. When i remove the IDataErrorInfo implementation in the data-class being used for binding, it acts normal...
Any pointers on this?
PS: Laptop is a MacBook Pro 2.4Ghz with 2gb RAM, so that should not be an issu...
I have a user control which contains a textbox. I have a class called Person which implements IDataErrorInfo interface:
class Person : IDataErrorInfo
{
private bool hasErrors = false;
#region IDataErrorInfo Members
public string Error
{
get
{
string error = null;
...
I have a data object that implements IDataErrorInfo however the validation logic is a bit slow. Not that slow, but slow enough you don't want to call it a large number of times. In my application a list of these objects gets displayed in a DataGridView control. The grid is read-only and will only ever contain valid data objects, however ...
Hi,
In WPF using IDataErrorInfo and Style I want to create form where I can provide end user three different status while validating data
To make scenario more clear
1) I have textbox next to it I have icon which provides end user what kind of input textbox expects - Initial status with information icon
2) As soon as user enter data ...
Hi
I have a validation class that implements IDataErrorInfo that has all the methods that you must implement.
One is
public string this[string columnName]
{
get
{
}
}
return "";
Now in this switch statement I have some validation for my form.
Now I noticed lots of my for...
Hi
I am reading Asp.net MVC Framework and I am reading about IDataErrorInfo as form of validation.
So I am just going to post what he has.
Product Class
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace MvcApplication1.Models
{
public partial class Product : IDataErrorInfo
{
priv...
Hello,
I have an object bound to a winform and this object implements IDataErrorInfo. I have an error provider. The problem is when a property of a a property change.
There is no problem when I change the age (ie the rules are checked and displayed/removed correctly). But when I change the job title, the error is not displayed/removed ...
I have a ViewModel that implements IDataErrorInfo and a master-detail-view. How can I trigger the vaildation of the current ViewModel item when the user hits the save button in the detail view and not earlier?
...
Can IDataError info be used properly in a winforms application? In the past I was doing my binding the usual way(1) and did the validation in the OnValidating event of the particular control. I would like to move the data validation to the domain model so that I can easily swap out user interfaces and so that all of the logic is in one p...
I have implemented IDataErrorInfo in one of my classes to validate a property of that class. The property is bound to a control on my wpf user control. The validataion works fine, except there is one vital flaw.
It seems to be calling the IDataErrorInfo member public string this[string columnName] before the property is updated, so ...
I have an Address object defined simply as follows:
public class Address
{
public string StreetNumber { get; set; }
public string StreetAddress { get; set; }
public string City { get; set; }
public string PostalCode { get; set; }
}
Fairly simple. On the advice an answer to another question I asked, I am referring to th...
I've got a simple address entry app that I'm trying to use the IDataErrorInfo interface as explained on the asp.net site.
It works great for items that can be validated independantly, but not so well when some items depend on others. For example, validating the postal code depends on the country:
private string _PostalCode;
pu...
I have a problem in WPF with validation.
I have a user control which has few textboxes, which are binding to datamodel.
The validation is implemented with IDataErrorInfo.
I want the validation to be triggered only when the user press the button "Submit data", so I used UpdateSourceTrigger="Explicit" with the binding of all those text...
I currently migrated my project to MVC 2 and IDataErrorInfo doesn't seem to work when using default model binding and validation. Is it cut out?
...
I'm trying to figure out the best way to validate a one page checkout.
It contains :
ship address
billing address
etc.
the Address class obvious contains First Name, Last Name, Street1, Street2, City, State, Zip, Phone etc.
Lets say the user clicks 'OK' before entering anything - then you end up with a dozen or more validation error...
What is a good way to integrate multiple field validation with IDataErrorInfo?
Let say that I have a dialog with 3 textboxes for ftp information
URL
Username
Password
I have put the Required attribute on the fields (assume a normal TextBox for the password).
I validate the ftp connection when the user press "OK". At the moment I sh...
I have a situation where I have a couple of variables who's values depend on each other like this:
A is a function of B and C
B is a function of A and C
C is a function of A and B
Either value can change on the UI. I'm doing the calculation and change notification like this:
private string _valA;
private string _valB;
private string _...
DataAnnotations vs IDataErrorInfo
Pros and Cons of both?
Benefits of one over the other? (especially related to MVC)
...
I'm starting to implement validation in my WPF project via the IDataErrorInfo interface.
My business object contains multiple properties with validation info. How do I get a list of ALL the error messages associated with the object. My thought is that thats what the Error property is for, but I cannot track down anyone using this for r...