ErrorPrivider V.S. BO Check rules


Author
Message
Ben Hayat
Ben Hayat
Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)Advanced StrataFrame User (570 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Is it better to use ErrorProvider to check user entry or let the BO check rules to validate the data?



Secondly, can ErrorProvider work with BO as it's datasource?

..ßen
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
An error provider can work with the BusinessBindingSource as it's data source... but I'm not sure if it can work with a business object directly as it's data source.  The IDataErrorInfo interface used by the error provider is set by the BrokenRules collection.  So, when you add a broken rule to your business object, the IDataErrorInfo properties will return the correct value.  So, if you want to handle user entry and use the error provider, you'll need to handle the field changed events on the business object and validate the data within the events, adding broken rules if they're not properly set. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search