Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In my application I am using two gridview controls with some radio button list. In both the grids I am using the AcceptID radiobutton list with the values Yes or NO. When the user selects the AcceptId value to Yes in both the grids then I want to enable one field outside the gridview. If the user selects any row in both the grid as acceptid as No then I want to disable that field. If he selects all the values of acceptid as Yes in both the grids then only I want to enable that control otherwise it should be disabled. I have used the javascript for one grid for disabling and enabling the controls it worked fine. I need the javascript for both the grids. Can anyone help me to solve this issue


Thanks in Advance
Posted
Comments
CRDave1988 12-Mar-12 3:33am    
Can u show ur java script of one gridview?
Prasad_Kulkarni 12-Mar-12 3:35am    
post your code mate,you will surely get your answer.

By using the attribute disabled of any HTML control element. Please see:
http://www.w3schools.com/tags/att_input_disabled.asp[^],
http://www.w3schools.com/jsref/prop_pushbutton_disabled.asp[^] (JavaScript for button, but it can be any control).

—SA
 
Share this answer
 
v2
document.getElementById( 'btnSubmit' ).disabled='true';
document.getElementById( 'btnSubmit' ).disabled='false';
 
Share this answer
 
C#
document.getElementById( "<% =txt.ClientID%>").disabled=true
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900