Click here to Skip to main content
15,889,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to access gridview item template's controls in javascript ?

Thanks in advance

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 27-Mar-14 3:29am
v3
Comments
[no name] 27-Mar-14 9:21am    
Do you really think that screaming at us helps in any way?
Member 10690248 27-Mar-14 9:24am    
NOT EXACTLY BUT IM NEW TO ASP.NET
[no name] 27-Mar-14 9:28am    
What does being new to ASP.NET to do with screaming at people? Do you always scream at people when you request their help? Have you tried anything before posting here? Anything at all? Even a simple search for the information you are looking for? I wasted approximately 3 seconds of my day and found that exact information you are asking for. Why couldn't you find it?
OriginalGriff 27-Mar-14 9:30am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

And as a result of your continued rudeness, I decline to answer, or even consider the question...
Member 10690248 9-Apr-14 3:15am    
Sorry

Gridview is rendered as Table in WebBrowser. so you can access the controls using table rows.

like
JavaScript
<script type="text/javascript">

          var table = document.getElementById("GridView1");

          if (table.rows.length > 0) {
              for (var i = 1; i < table.rows.length; i++)
              {
                  var elements= table.rows[i].getElementsByTagName("input");
              }
          }
 </script>
 
Share this answer
 
Comments
Member 10690248 27-Mar-14 10:01am    
TNX

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