i have below which i append to a dynamic created gridview. i retrieve the data using json. my problem is i have append an input button with onserverclick event to call server-side function to it but it doesn't work.. how do make the onserverclick event work i dynamically created the gridview and button..please help..tq so much...
$(document).ready(function () {
Ret_LectureData();
});
function Ret_LectureData() {
var lectID = document.getElementById("<%=txtnopkj.ClientID%>").value;
//alert(lectID);
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "LData.ashx",
data: "{ 'lectID': '" + lectID + "' }",
dataType: "json",
success: function (result) {
$("#MainContent_gvLectureData").empty();
$("#MainContent_gvLectureData").append(
"" ");
+ "NO. "
+ "sl_ss_id "
+ "SEMESTER "
+ "CODE "
+ "GROUP "
+ "sl_fr_id "
+ "sl_lect_id "
+ "sl_rep_id "
+ "sl_cou_bm "
+ "COURSE "
+ "STUDENT ENROLLED"
+ "STUDENT EVALUATED "
+ "sl_total "
+ "SCORE (%) "
+ "sl_datecreate "
+ " "
+ "
//alert(result[0].sl_id );
for (var i = 0; i < result.length; i++) {
j = i + 1;
$("#MainContent_gvLectureData").append(
"" " " " " " " " " " " " " " " " ");
+ j + "
+ result[i].sl_ss_id + "
+ result[i].sl_term_id + "
+ result[i].sl_cou_id + "
+ result[i].sl_group_id + "
+ result[i].sl_fr_id + "
+ result[i].sl_lect_id + "
+ result[i].sl_rep_id + "
+ result[i].sl_cou_bm + "
+ result[i].sl_cou_bi + "
+ result[i].sl_enrolled + "
+ result[i].sl_evaluated + "
+ result[i].sl_total + "
+ result[i].sl_percentage + "
+ result[i].sl_datecreate + "
+ "
"

+ "
}
},
error: function (result) {
alert("Error");
}
});
}
Midhun TpPosted Nov 25, 2016, 12:10 AM
sakthi sudhanPosted Nov 26, 2016, 5:49 AM
Hazel MahmudPosted Nov 25, 2016, 11:45 AM
Hazel MahmudPosted Nov 25, 2016, 10:05 AM
Hazel MahmudPosted Nov 24, 2016, 9:44 PM