TypedView & Validation with INotifyDataErrorInfo

Posts   
 
    
YvesVD
User
Posts: 177
Joined: 19-Oct-2006
# Posted on: 02-Sep-2013 12:01:48   

Hi,

Since .Net4.5 the INotifyDataErrorInfo interface is part of WPF. I'd like to use it to validate my TypedView. I used the designer to generate Required attributes for my TypedView. [Required(ErrorMessage="blabla")]

public System.Double Coeff1 
{
    get { return IsCoeff1Null() ? (System.Double)TypeDefaultValue.GetDefaultValue(typeof(System.Double)) : (System.Double)this[_parent.Coeff1Column]; }
    set { this[_parent.Coeff1Column] = value; }
}

I wonder if you had a sample application using INotifyDataErrorInfo with TypedView and Entities ?

thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-Sep-2013 20:36:15   

Please check the following thread on IDataErrorInfo: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=21657

In general for other unimplemented interfaces, you may write your own templates to generate the implementation for Entities and TypedViews.

YvesVD
User
Posts: 177
Joined: 19-Oct-2006
# Posted on: 03-Sep-2013 09:09:25   

Do the TypedViews support IDataErrorInfo interface ?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 03-Sep-2013 17:25:26   

TypedViews are readonly DataTable deriving classes, so everything the datatable supports is supported by tyedviews. As datatables are bound through their dataview objects, and rows are bound through DataRowView classes, IDataErrorInfo is supported as it's implemented by DataRowView simple_smile

Frans Bouma | Lead developer LLBLGen Pro