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
519
Best approach for Validation within cells of a UltraGrid - Datasource is a business entity rather than a datarowiew
posted

Hello, 
I have a grid whose data source is a business entity, ie BindingList .
I want to validate user inputs for all cells in the row(s) for that grid.

I want to use the approach listed at http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WinGrid_Display_Row_Cell_Errors_Using_IDataErrorInfo.html  
but the issue is that in my case the e.Row.ListObject returns a BidingList . , whereas the example in this link expects a DataRowView . How did you resolve it in ur case, as you also had a business entity and not a DataRowView .

Pls advice. Is there any other better approach for it ?
using fragistics UltraValidator control, custom coding for cellupdate events, etc.

Thanks....

  • 469350
    Suggested Answer
    Offline posted

    Your ListObject is returning a BindingList? That doesn't make any sense unless every row in your list is another list, in which case, I'm not sure that the grid would even be able to display it.

    Based on your other post, it sounds like your ListObject should be returning some custom object (a Person class in your other example). In which case, your Person class would have to implement IDataErrorInfo in order for you to use the DataErrorInfo support in the grid.