Click here to Skip to main content
Rate this: bad
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
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';
priya from Madras at 30-Mar-12 9:50am
ya actually i tried for the same method . but it doesnt take tat textbox id.
Bojjaiah at 30-Mar-12 9:55am
can you post your code?
priya from Madras at 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">
Bojjaiah at 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
0 OriginalGriff 405
1 Peter Leow 225
2 Sergey Alexandrovich Kryukov 210
3 Maciej Los 195
4 DamithSL 174

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