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
boycoto
NA
147
125.5k
Select Item on a LookUp
Apr 24 2013 1:57 AM
Can anyone help me on how to select
a record on a jquery dialog and pass the
value to a textbox on Page1. I am using
function SelectGrid to pass the value, but
is not working.
Page1.aspx
[code]
$(document).ready(function() {
$("#btnLookUp").click(function() {
$("#searchActor").dialog({
autoOpen: "false",
resizable: "false",
height: "250",
width: "320"
});
});
});
$(document).ready(function() {
$("#btnSearch").click(function() {
$("#actorsList").load("LookUp/ActorsList.aspx", { lname: $("#txtSearchCriteria").val() });
});
return false;
});
function SelectGrid(objValue, itemValue , popUpDialog) {
$(objValue).val(itemValue);
$(popUpDialog).dialog("close");
}
[/code]
ActorsList.aspx Codebehind
[code]
private void LoadActors(string param)
{
DataTable dt = new DataTable();
//Execute stored proc
Response.Write("<table>");
foreach (DataRow dr in dt.Rows)
{
Response.Write("<tr>");
Response.Write("<td>" + "<label onclick='SelectGrid(#txtActorId,0,#searchActor'>Select</label>" + "</td>");
Response.Write("<td>" + dr[2].ToString() + "</td>");
Response.Write("<td>" + dr[3].ToString() + "</td>");
Response.Write("<td>" + dr[4].ToString() + "</td>");
Response.Write("</tr>");
}
Response.Write("</table>");
}
[/code]
Reply
Answers (
0
)
Wear code at the end of my aspx urls
HOW TO ADD COUNTRY IMAGES AND BIND IN GRIDVIEW