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

Throw Validation Exception on CellEditEnded

1 Answer 87 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.
Julian
Top achievements
Rank 1
Julian asked on 28 Nov 2011, 07:12 PM
Hi, 

I'm trying to work out how I can push an exception to the Cell after the Cell has been edited.
Essentially, the Validation checks that a Product Code has been entered in the correct format (using gvMain_CellValidating) and upon CellEditEnded, uses the data within the cell to load the Product.

If the Product Code is not within the database however, I would like to throw an exception at this point which will then work like a validation exception.

The code uses custom classes, hooked into WCF and Rx so there's a few steps before we can ascertain whether the product code is correct but upon loading, the result will either be true or false. 

If false, I would like the user to receive the Cell Validation message. I can do a Message Box easily but this isn't with the design of the product.

Please could you point me in the right direction.

Many thanks

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 01 Dec 2011, 05:28 PM
Hi Julian,

Please, let me propose you an alternative approach for this scenario. You may try loading the product codes in a RadComboBox and using "search as you type", choose the desired one, loading the respective product/s from the database. Would you please confirm whether such a solution is applicable in your case?

Kind regards,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
GridView
Asked by
Julian
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or