Bobindra Kumar

Bobindra Kumar

  • 1.4k
  • 324
  • 12.3k

Uncaught TypeError: setData.append is not a function

May 4 2018 3:38 AM
@model CrudPopupJquery.Models.EmployeeViewModel
@{
Layout = null;
}
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<div class="container" style="margin-top:3%">
<a href="#" class="btn btn-info" onclick="AddNewstudent(0)">Add New Employee</a><br/><br />
<table class="table table-striped" >
<thead>
<tr>
<th>EmpId</th>
<th>EmpName</th>
<th>EmailId</th>
<th>PhoneNo</th>
<th>Action(Edit)</th>
<th>Action(Delete)</th>
</tr>
</thead >
<tbody id="SetStudentList">
<tr id="LoadingStatus" style="color:red">
</tr>
</tbody>
</table>
</div>
<script>
$("#LoadingStatus").html("Loading...");
$.get("Home/GetStudentList", null, DataBind);
$.noConflict();
function DataBind(StudentList)
{
alert('hi');
var SetData = ("#SetStudentList");
for (var i = 0; i < StudentList.length; i++)
{
var Data = "<tr class='row_" + StudentList[i].EmpId + "'>"+
"<td>" + StudentList[i].EmpId + "<td>"+
"<td>" + StudentList[i].EmpName + "<td>"+
"<td>" + StudentList[i].EmailId + "<td>"+
"<td>" + StudentList[i].PhoneNo + "<td>"+
"<td>"+"<a href='#' class='btn btn-warning' onclick='Editstudent()'><span class='glyphicon glyphicon-edit'></span></a>"+"</td>"+
"<td>"+"<a href='#' class='btn btn-danger' onclick='Deletestudent()'><span class='glyphicon glyphicon-trash'></span></a>"+"</td>"+
"<tr>";
//setData.append(Data);
SetData.apeend(Data);
$("#LoadingStatus").html(" ");
}
}
</script>

Answers (4)