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

CustomValidator causes loss of data

2 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jarrod Marshall
Top achievements
Rank 1
Jarrod Marshall asked on 09 Feb 2010, 07:02 PM
Hello,
I'm working through a current problem with a page that utilizes a RadGrid along with CustomValidator ASP.NET controls.

When an item is edited inline, the client side validators still somehow allow a postback to occur via 

GridEditCommandColumn

 

column. When this happens, validation fails on the server side and any posted back changes to the form are completely lost (even cells which contained valid data).

I'd like to either be able to 1) Stop the postback on the client side as it *HAS* failed validation or 2) maintain the row's values after the canceled update attempt has occured.

Has anyone seen similar behavior? All client side validation does is set the args.IsValid to true or false and I can confirm this works - but showhow it just allows me to still click the update command item image.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Feb 2010, 07:09 AM
Hi,

Please take a look at the link below on how to perform client side validation using Custom Validator.


I have tried the example using the Inplace edit mode and it does not postback at my end.

Hope this helps. Do let me know if you have any more queries.


Thanks,
Princy
0
Anthony Romero
Top achievements
Rank 1
answered on 10 Mar 2010, 08:55 PM
I'm having a similar issue, however I need access to the server side in order to validate the control properly. Is there any other workaround besides using client side validation?
Tags
Grid
Asked by
Jarrod Marshall
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Anthony Romero
Top achievements
Rank 1
Share this question
or