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

set validation error on cell from outside grid

3 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 17 Oct 2011, 03:42 PM
In my CellValidating handler I can set my cell to show the red validation error with 

        e.IsValid = false;
        e.ErrorMessage = "OrderNO must be longer than five characters.";

But is it possible to set this from outside the grid, i.e. when an async lookup returns some while later.
Thanks
Jim

3 Answers, 1 is accepted

Sort by
0
Jim
Top achievements
Rank 1
answered on 19 Oct 2011, 04:16 PM
I guess it's not possible!
The only way I can get async validation to work is to use

INotifyDataErrorInfo


on the data objects.
So I and add and remove erros from the object and this show on the grid.
Jim
0
Maya
Telerik team
answered on 19 Oct 2011, 04:21 PM
Hello Jim,

Indeed, you can work with INotifyDataErrorInfo. Please take a look at this blog post for a reference.
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Jim
Top achievements
Rank 1
answered on 21 Oct 2011, 07:25 AM
Yes it seems to work OK
Thanks
Jim
Tags
GridView
Asked by
Jim
Top achievements
Rank 1
Answers by
Jim
Top achievements
Rank 1
Maya
Telerik team
Share this question
or