I'm using Asp.net MVC to update the assigned user for a list of tasks. The update works fine on the first page no matter how many are displayed on the first page 10,50 or 100.
When we click 'Next' to go to the second page and click to update the tasks, the taskIds do not get posted back to the controller.
Can anyone see what I'm doing wrong in the code below?
[code]
/*global $, jQuery,document,fnCreateSelect*/
$(document).ready(function () {
"use strict";
$('.check:button').toggle(function () {
$('input:checkbox').attr('checked', 'checked');
$(this).val('uncheck all');
}, function () {
$('input:checkbox').removeAttr('checked');
$(this).val('check all');
});
/* Initialise the DataTable */
var oTable = $('#example').dataTable({
"aoColumns": [
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" }
],
"oLanguage": {
"sSearch": "Search all columns:"
},
"bAutoWidth": false
});
/* Add a select menu for each TH element in the table footer */
$("tr td.filter").each(function (i) {
if (i > 0) {
this.innerHTML = fnCreateSelect(oTable.fnGetColumnData(i));
$('select', this).change(function () {
oTable.fnFilter($(this).val(), i);
});
}
});
});
[/code]
Thanks for any help
When we click 'Next' to go to the second page and click to update the tasks, the taskIds do not get posted back to the controller.
Can anyone see what I'm doing wrong in the code below?
[code]
/*global $, jQuery,document,fnCreateSelect*/
$(document).ready(function () {
"use strict";
$('.check:button').toggle(function () {
$('input:checkbox').attr('checked', 'checked');
$(this).val('uncheck all');
}, function () {
$('input:checkbox').removeAttr('checked');
$(this).val('check all');
});
/* Initialise the DataTable */
var oTable = $('#example').dataTable({
"aoColumns": [
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" }
],
"oLanguage": {
"sSearch": "Search all columns:"
},
"bAutoWidth": false
});
/* Add a select menu for each TH element in the table footer */
$("tr td.filter").each(function (i) {
if (i > 0) {
this.innerHTML = fnCreateSelect(oTable.fnGetColumnData(i));
$('select', this).change(function () {
oTable.fnFilter($(this).val(), i);
});
}
});
});
[/code]
Thanks for any help