Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
IDataErrorInfo on an ObservableCollection
posted

Hi Mike,

I am using ObservableCollection as a datasource for the ultragrid. It is binding properly. I am doing validation on grid columns. As ListObject returns the object type for the row and this row can be casted to the DataRowView when it is binded by dataset. I am trying same thing but it is throwing casting error. As you stated above (http://forums.infragistics.com/forums/t/1157.aspx) my observablecollection is not implementing IDataErrorInfo.

I want to set the error at particular datarowview.

Is there any other way to set error for ObservableCollection?

Thanks

Akshay

 

 

Parents
No Data
Reply
  • 45049
    Suggested Answer
    posted

    Akshay,

    If the items in your object don't implement IDataErrorInfo, then you can't set error information on your data objects which would be displayed in WinGrid.

    As Mike mentions in the original thread, your data object is not necessarily a DataRowView.

    To provide thsi functionality yourself, you need to implement IDataErrorInfo on your class that represents an individual data object, not the ObservableCollection.  By comparison, DataRowView implements IDataErrorInfo, while DataView does not.

Children
No Data