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

Validation Lookup

2 Answers 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
David Ocasio asked on 17 Nov 2009, 08:12 PM
This is a difficult  question.
I suspect the answer is hell no.

Is there any provision or functionality in the grid that allows for
row validation  or cell validation
against a domain data source query operation.

heres the first scenario.
A person enters inline the contents of a number of fields in a single row.
one of the fields is freeform and anything can be entered.
this need to be validated against the database for validity.
it may also be prefaced by the neighboring field

example

field1 field2
a    b            allowed
c    d            allowed
a    d            not allowed

My first instinct is to try the rowvalidating event
but since all the domain operations are asynchronous
i cannot block the event.

i guess i could cancel it
And try to end the edit again when the validation call returns.

i cannot draw all the possible records to the client so i am forced to
Make the lookup after they edit the row and not provide a dropdown.

any advise, ideas
or is this a pipe dream

thanks
dco




2 Answers, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 20 Nov 2009, 01:42 PM
Hello David Ocasio,

Unfortunately answer to your questions is no indeed. In order to use Validating events in such asynchronous case you could provide some proxy classes (view model pattern). These proxy classes you can validate using EnterpriseLibrary.ValidationBlock. The main advantage of the Validation block is that you can change validation rules on the fly (just update config file when data base validations are changed and restart the application).

Sincerely yours,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 20 Nov 2009, 02:31 PM
thought as much

thanks
dco
Tags
GridView
Asked by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Nedyalko Nikolov
Telerik team
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or