为什么我的columnfilter不能过滤?

我想在页面上使用columnfilter。在一个页面上,这个过滤工作可以完成,但是在这个页面上它没有。我试着从这样的作品,我试图从脚本列表中拖动到页面,但仍然没有在网页coppying相同的脚本的URL。为什么我的columnfilter不能过滤?

注:该页面有搜索页眉和页脚字段和它的反应,当我把搜索文本中,但它没有返回。我得到:“显示0条目的0到0(从10条总条目中筛选)”...每一次。

我能怎么做错误或丢失?感谢您的任何帮助与这一个>

<link href="../../Content/dataTable/the_table.css" rel="Stylesheet" type="text/css" /> 

<script src="../../Scripts/DataTables-1.9.1/media/js/jquery.dataTables.js" type ="text/javascript"></script>

<script src="../../Scripts/jquery.dataTables.columnFilter.js" type ="text/javascript"></script>

<script src="../../Scripts/jquery.ui.datepicker.js" type="text/javascript"></script>

<script type="text/javascript">

$(document).ready(function() {

$(".datefield").datepicker();

$("#history").dataTable().focus().columnFilter({

aoColumns: [null, { type: "text" },null , null, null, null]

});

});

</script>

<br /><br />

@Html.ActionLink("Select", "ClassAttendance", "Attendance", new { rows = Model.Enrollments.Count(), id = @ViewBag.ID, teacher = HttpContext.Current.Session["sTeacher"], courseID = HttpContext.Current.Session["sCourseID"] }, null)

<p></p>

@using (Html.BeginForm("ClassAttendance", "Attendance", new { rows = Model.Enrollments.Count(), id = @ViewBag.ID, sTeacher = @ViewBag.teacherName, courseID = HttpContext.Current.Session["sCourseID"] }, FormMethod.Post))

{

var attend = new Enrollment();

@Html.ValidationSummary(true)

<p></p>

<h3>Students Enrolled in @ViewBag.teacherName's @ViewBag.courseTitle class</h3>

<div>

<table id=history>

<thead>

<tr>

<th>Reports</th>

<th>First Name</th>

<th>Last Name</th>

<th>Grade</th>

<th>Attendance Code</th>

<th>Class Day</th>

</tr>

</thead>

<tfoot>

<tr>

<td>Reports</td>

<td>First Name</td>

<td>Last Name</td>

<td>Grade</td>

<td>Attendance Code</td>

<td>Class Day</td>

</tr>

</tfoot>

<tbody>

@foreach (var item in Model.Enrollments)

{

@Html.HiddenFor(modelItem => item.EnrID)

@Html.HiddenFor(modelItem => item.Asgnt)<!--navigational-->

@Html.HiddenFor(modelItem => item. Title)

@Html.HiddenFor(modelItem => item.CouID)

@Html.HiddenFor(modelItem => item.Date)

@Html.HiddenFor(modelItem => item.dayOfWeek)

@Html.HiddenFor(modelItem => item.Actor)

@Html.HiddenFor(modelItem => item.SudIDD)

@Html.HiddenFor(modelItem => item. Address)

<tr>

<td>

@Html.ActionLink("Report", "PrintCustomers", "PdfRender", new { sName = item.Student.FirstMidName, courseTitle = item.Course.Title, sNumber = item.Student.StudentNum, instructorName = HttpContext.Current.Session["teacherName"] }, null)

</td>

<td>

@Html.EditorFor(modelItem => item.Student.FirstMidName)

</td>

<td>

@Html.EditorFor(modelItem => item.Student.LastName)

</td>

<td>

@Html.TextBoxFor(modelItem => item.HomeworkGrade)

@Html.ValidationMessageFor(model => model.Enrollments.FirstOrDefault().HomeworkGrade)

</td>

<td>

@Html.TextBoxFor(modelItem => item.attendanceCode)

@Html.ValidationMessageFor(model => model.Enrollments.FirstOrDefault().attendanceCode)

</td>

<td>

@Html.EditorFor(modelItem => item.classDays)

</td>

</tr>

}

</tbody>

</table>

</div>

<br />

<Input Type ="submit" Value="Submit Attendance"/>

}

回答:

我最后通过具有它脚手架而不是复制一个视图,粘贴的功能到另一个和调整重新创建视图。我怀疑它可能有一些做没有价值或仅仅拥有视图导航性能的导航性能。请让我知道你在想什么。谢谢。

回答:

我不知道这是否导致你描述的问题,但你的表id没有引用。

<table id=history>

<table id="history">

以上是 为什么我的columnfilter不能过滤? 的全部内容, 来源链接: utcz.com/qa/257495.html

回到顶部