Submit of form containing datatable only includes values for controls if previously changed page row
Submit of form containing datatable only includes values for controls if previously changed page row
ChrisBashaw
Posts: 2Questions: 0Answers: 0
Note: This is not the issue about data submitted containing only the rows currently being displayed.
Anyone with ideas about this appreciated.
Issue: When I click the submit button of the form containing the data table none of the values (of controls on the table) are being sent to the server. However, if I first change the pagination by changing the select from 10 to 25 and back to 10 again then the data is being posted successfully to the server.
Assumption: The changing pagination length must be looping thru the rows and setting some state flag or similar that somehow triggers the inclusion of the control values during the submit.
Tech:
Data Tables Version 1.9.4, browser:IE10, Code:C#-MVC-Razor-VisualStudio2012-HTMLHelpers, Ajax
DataTable Creation:
$('#UserNoted').dataTable({
"bPaginate": true,
"sPaginationType": "full_numbers",
"bLengthChange": true,
"sDom": '<"H"<"tools">lfr>t<"F"ip>',
bAutoWidth": false,
"bSort": true,
"bJQueryUI": true,
"aoColumns": [
{ "sSortDataType": "dom-checkbox" },
{ "sClass":"myhidedpass", "sSortDataType": "dom-hidden", "bSearchable": false },
null,
null,
null,
]});
$("div.tools").html('
Anyone with ideas about this appreciated.
Issue: When I click the submit button of the form containing the data table none of the values (of controls on the table) are being sent to the server. However, if I first change the pagination by changing the select from 10 to 25 and back to 10 again then the data is being posted successfully to the server.
Assumption: The changing pagination length must be looping thru the rows and setting some state flag or similar that somehow triggers the inclusion of the control values during the submit.
Tech:
Data Tables Version 1.9.4, browser:IE10, Code:C#-MVC-Razor-VisualStudio2012-HTMLHelpers, Ajax
DataTable Creation:
$('#UserNoted').dataTable({
"bPaginate": true,
"sPaginationType": "full_numbers",
"bLengthChange": true,
"sDom": '<"H"<"tools">lfr>t<"F"ip>',
bAutoWidth": false,
"bSort": true,
"bJQueryUI": true,
"aoColumns": [
{ "sSortDataType": "dom-checkbox" },
{ "sClass":"myhidedpass", "sSortDataType": "dom-hidden", "bSearchable": false },
null,
null,
null,
]});
$("div.tools").html('
This discussion has been closed.
Replies
I just apped all remaing recods in my form on form submit event. So in that way all the fields are being posted.
Here is my code.
[code] var table = $('#paging_container').dataTable( {
"sPaginationType": "full_numbers",
"bStateSave": true,
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": false,
"bInfo": true,
"bAutoWidth": false
} );
$("#formID").submit(function () {
var hiddenArea = $("
Can anyone think of a reason that changing the length drop combo (number of rows to display) to anything else not only changes the number of rows displayed but also somehow must be setting a flag or some other state variable for all the controls in the data table and clicking on my save (post) button does include the data for the controls in the data table. Thanx!