Click here to Skip to main content
12,299,715 members (56,426 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript
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 30-Mar-12 3:13am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

call this function where u want

function enable() {
           document.getElementById( '<%=txtid.ClientID%>' ).disabled = 'false';
       }
function disable() {
           document.getElementById( '<%=txtid.ClientID%>' ).disabled = 'true';
       }
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 30 Mar 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100