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
    Admin
    Marin avatar
    1044 posts

    Posted 02 Oct 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top