gridview visible when keypress

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Feb 2008
Posts: 8
Reputation: mariappan.s is an unknown quantity at this point 
Solved Threads: 0
mariappan.s mariappan.s is offline Offline
Newbie Poster

gridview visible when keypress

 
0
  #1
Oct 31st, 2008
hi friends.. In asp.net , i want to show the gridview when keypress in textbox.. how to do in javascript..
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: gridview visible when keypress

 
0
  #2
Nov 1st, 2008
  1. txtbox.attributes.add("onkeypress","javascript:return gridvisible();");
  2.  
  3. <script>
  4. function gridvisible()
  5. {
  6. var gd=document.getelementbyid("u r gridview id");
  7. gd.style.visibility="visible";
  8. //in case u want to the gridview to be not visible use this
  9. gd.style.visibility="hidden";
  10.  
  11. }
  12.  
  13. </script>
Last edited by peter_budo; Nov 2nd, 2008 at 5:07 am. Reason: Keep It Organized - please use [code] tags
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 8
Reputation: mariappan.s is an unknown quantity at this point 
Solved Threads: 0
mariappan.s mariappan.s is offline Offline
Newbie Poster

gridview

 
0
  #3
Nov 12th, 2008
sir... i want to set visible=true for gridview when i keypress in textbox.. in asp.net
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 8
Reputation: mariappan.s is an unknown quantity at this point 
Solved Threads: 0
mariappan.s mariappan.s is offline Offline
Newbie Poster

Re: gridview visible when keypress

 
0
  #4
Nov 15th, 2008
Originally Posted by greeny_1984 View Post
  1. txtbox.attributes.add("onkeypress","javascript:return gridvisible();");
  2.  
  3. <script>
  4. function gridvisible()
  5. {
  6. var gd=document.getelementbyid("u r gridview id");
  7. gd.style.visibility="visible";
  8. //in case u want to the gridview to be not visible use this
  9. gd.style.visibility="hidden";
  10.  
  11. }
  12.  
  13. </script>
Thank u Sir.. But i hv one problem. when my page load, control should be visible=false.. when i keypress in textbox, it'll be visible=true..
i hv set visible=false in design.. then used that javascript code.. it s not work out.. if possible, can u solve my problem
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: gridview visible when keypress

 
0
  #5
Nov 18th, 2008
add this to the design view of gridview

Style="visibility: hidden"
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 8
Reputation: mariappan.s is an unknown quantity at this point 
Solved Threads: 0
mariappan.s mariappan.s is offline Offline
Newbie Poster

Re: gridview visible when keypress

 
0
  #6
Nov 25th, 2008
Thank u very much sir.. i got it...
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: gridview visible when keypress

 
0
  #7
Nov 25th, 2008
if so then its better u mark the thread as solved so that others wont view this thread
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum


Views: 1980 | Replies: 6
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC