Java Script Validation for Radio Button inside Grid View
-
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)
-
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)
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
-
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)
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
-
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)
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