Run javascript in edit mode

2 posts, 0 answers
  1. Vikram
    Vikram avatar
    5 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2012 Link to this post

    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.
  2. Marin
    Marin avatar
    1057 posts

    Posted 02 Oct 2012 Link to this post


     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,
    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.
Back to Top