TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sivajihero Hero
NA
105
32.7k
Moving to next textarea in gridview.
Apr 4 2016 2:32 AM
This is my java script to go to next textbox in gridview while pressing enter. But in my gridview it contains textbox, dropdownlist and buttons. So how can I add dropdownlist and buttons to this code. This code only works for textbox inside the gridview.
<script src="https://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$("#GridView1").find("input[type='text']").keydown(function(event) {
if ((event.keyCode == 40 || event.keyCode == 13)) {
event.preventDefault();
var td = $(this).parent().next("td");
if (td.length > 0) {
td.find("input[type='text']").focus();
} else {
var tr = $(this).parent().parent().next("tr");
if (tr.length > 0) {
tr.find("td").first().find("input[type='text']").focus();
}
}
}
})
});
</script>
Reply
Answers (
2
)
using win merge tool
export gridview to excel sheel in windows based app