Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my project i ve a textbox inside the gridview .i need to visible and disable that textbox in javascript .how can i cal ?

Help me.
Posted

1 solution

call this function where u want

JavaScript
function enable() {
           document.getElementById( '<%=txtid.ClientID%>' ).disabled = 'false';
       }
function disable() {
           document.getElementById( '<%=txtid.ClientID%>' ).disabled = 'true';
       }
 
Share this answer
 
Comments
priya from Madras 30-Mar-12 9:50am    
ya actually i tried for the same method . but it doesnt take tat textbox id.
Bojjaiah 30-Mar-12 9:55am    
can you post your code?
priya from Madras 30-Mar-12 10:03am    
i create row and cal that row id mean its working .in pageload it shows "the textbox value is null" but when i cal the tr id its working fine .
<asp:gridview id="gv" runat="server" >
<tr id="txtid">
textbox
</tr>
Bojjaiah 30-Mar-12 10:18am    
this is not clear. plz can u post full code?

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