Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Scaffolding Wizards - How to show validation errors when IDataErrorInfo is used

$
0
0

This example demonstrates how to show validation errors when IDataErrorInfo is used. For more information, refer to the corresponding help topic.

You can encounter the following exception:

A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)

This error is caused because the EntityFramework uses the missing LocalDB component.

To fix the issue, locate the App.config file within your application and open it. Change the defaultConnectionFactory in the following manner:

[XAML]
<defaultConnectionFactorytype="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
Question Comments

Added By: Marc Esteve at: 10/15/2015 8:06:43 AM    

I implement IDataErrorInfo and validation is performed correctly. However, error Icons are not displayed beside DevExpress editors within my Winforms user control.
Why?

Added By: Alexander S (DevExpress Support) at: 10/15/2015 10:16:34 AM    

Hi Marc,

To process your recent post more efficiently, I created a separate ticket on your behalf: T300893: Editors don't show validation errors from the IDataErrorInfo when located in a WinForms user control. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>