This is a migrated thread and some comments may be shown as answers.

[Solved] radgridview and asynchronous validation

0 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jim
Top achievements
Rank 1
Jim asked on 09 Aug 2011, 08:52 AM
I have a collection of objects of the following type

Public

 

 

Class Room

 

 

 

Implements System.ComponentModel.INotifyDataErrorInfo

 

 

 

Implements INotifyPropertyChanged

 

It has an number of properties ID, IDdescription, other info ...
I create a new row and type the ID in the first column and press tab
It moves to next column which is the IDdescription and the onto other info fields.
Once I exit the ID field I can send a request to the server to validate the ID.
I get the response back (asynchronous ) either invalid or a valid IDdescription string to go in the second field.
But I am unsure as the best way to handle the returned async error/valid string.
Given my collection implements  INotifyDataErrorInfo then I have the option add an error on the collection.
But my async return routine doesn't know where to put any error or valid return IDdescription string.
I tried indexof but that returns -1 , I assume because the row is not yet in the collection as it's still new and being edited.
Any pointers on this ?
Thanks
Jim








Tags
GridView
Asked by
Jim
Top achievements
Rank 1
Share this question
or