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

How do I implement validation on UserControl Edit form?

2 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 04 Jan 2011, 03:42 PM
I have to make some checks through WebServices before I save/update. Can I stop my buttons from doing any Insert/Update action? And ofc leave the edit-form open if validation fails.

//h

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jan 2011, 08:55 AM
Hello Henrik,

You can use the server-side validation mechanism to achieve the desired scenario.

Refer the following demo for more on server-side validation of the RadGrid edit form.
Grid / Flexible Server-side Validation

Shinu.
0
Henrik
Top achievements
Rank 1
answered on 05 Jan 2011, 09:47 AM
Hi!

Yeah I can usew that but I need to do some custom things so I need to manually do it if possible.

I noticed that If I have a blank CommandName on button no action is taken ... But if I set CommandName="PerformInsert" in code in my button things happen.

Only problem is when I do like this DataItem is lost after postback so I have to preserve DataItem in ViewState manually

Not sure if this is the way to do it though ..

//h
Tags
Grid
Asked by
Henrik
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Henrik
Top achievements
Rank 1
Share this question
or