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

Run javascript in edit mode

1 Answer 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vikram
Top achievements
Rank 1
Vikram asked on 27 Sep 2012, 09:43 PM
I have a radGrid with the custom edit form. I have to run a few javascripts that would validate the fields when the user clicks the edit button. For eg. I have a user data that has username, password and other personal details. So, when I click edit I want to run a script that would validate the values fields and update the error labels on the form.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 02 Oct 2012, 10:26 AM
Hello,

 In this case it is appropriate to use a custom button (for example in a template column) that fires the respective command (edit, update etc.) and handle its click event on the client. There you can execute the javascript that validates the fields and cancel the postback by returning false or let the button perform a postback and fire the command on the server if the validation is successful.

Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Vikram
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or