Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Java Script Validation for Radio Button inside Grid View

Java Script Validation for Radio Button inside Grid View

Scheduled Pinned Locked Moved ASP.NET
javacsstoolshelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Binod K
    wrote on last edited by
    #1

    Hi, I have a grid view and in item template i have placed one Radio buton. Below the grid i have Edit and Delete button. On the click of these button i want to call java script validation, to check whether the any of the Radio button is selected or not. I dont want sever validation. Your reply with some valuable link or Code will be great help. Thanks

    Binod K. (Miles to go before I sleep)

    S S J 3 Replies Last reply
    0
    • B Binod K

      Hi, I have a grid view and in item template i have placed one Radio buton. Below the grid i have Edit and Delete button. On the click of these button i want to call java script validation, to check whether the any of the Radio button is selected or not. I dont want sever validation. Your reply with some valuable link or Code will be great help. Thanks

      Binod K. (Miles to go before I sleep)

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      Check this url might help you http://gridviewguy.com/CategoryDetails.aspx?categoryID=7[^]

      Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... " Check My Blog

      1 Reply Last reply
      0
      • B Binod K

        Hi, I have a grid view and in item template i have placed one Radio buton. Below the grid i have Edit and Delete button. On the click of these button i want to call java script validation, to check whether the any of the Radio button is selected or not. I dont want sever validation. Your reply with some valuable link or Code will be great help. Thanks

        Binod K. (Miles to go before I sleep)

        S Offline
        S Offline
        Shaik Haneef
        wrote on last edited by
        #3

        You can do one thing...... First run the code by just placing on Radio button in the GridView In ouput (after pressing f5), If u have any rows then it shows rows along with Radio Button then see the source of the file In that you will find the id of the Control like : gv_ctl02_rdo gv is Gridview ID , ctl02 is the default control name, rdo is my radio button id. this only example for you once you get id from source then everything is over you can just write a javascript block to find the id Ex: document.getElementByID('gv_ctl02_rdo').cheked or not..... Regards, Shaik Haneef

        1 Reply Last reply
        0
        • B Binod K

          Hi, I have a grid view and in item template i have placed one Radio buton. Below the grid i have Edit and Delete button. On the click of these button i want to call java script validation, to check whether the any of the Radio button is selected or not. I dont want sever validation. Your reply with some valuable link or Code will be great help. Thanks

          Binod K. (Miles to go before I sleep)

          J Offline
          J Offline
          Jay_se
          wrote on last edited by
          #4

          Call your JavaScript function like below from your aspx page:

          "JavaScript:Validate('<%= serverControlID.ClientID%>')"

          Here, the Validate javascript function receives the Client Id of the server control & perform your required operation. I hope, it will help you.

          Jey

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups