.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Post New Resource Bookmark and Share   

Set the focus to the first item template control in the grid view using javascript.

Posted By:Mihir Soni       Posted Date: February 03, 2011    Points: 15    Category:    URL: http://www.dotnetspark.com  

This code snippets will help you to focus your gridview controls in Edit item template. So that you can use tab functionality


Please write following code in javascript and just call it on page load event.

function window_onload()

var gridViewID = "<%=gvDoc.ClientID %>";
var gridView = document.getElementById(gridViewID);
var gridViewControls = gridView.getElementsByTagName("input");
if (gridViewControls[0].type == "text")

Thank you


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend