So I'm using the JQuery datatables.net(www.datatables.net) and having alot of success. But recently I tried to add some checkbox columns but am not having much success. Visually everything is working but when I actually check/uncheck it does not change the underlying value underneath, either when I inspect the element with chrome or catch it in javascript. Do I need to update the table or something to refresh the DOM object?
Javascript creating datatable:
$('#userGroupSettings').dataTable({
"bJQueryUI": true,
"aoColumns": [
/* ID */
{
"bVisible": false
},
/* Group Name */null,
/* Display Group */null,
/* Group Minimised*/null,
/* Send Fault Email*/null],
"aaSorting": [[1, "asc"]]
});
asp mvc razor code for creating the table:
<table id="userGroupSettings">
<thead>
<th>Group ID</th>
<th>Group Name</th>
<th>Display Group</th>
<th title="When loading the webpage this will determine if the group is minimised or not">Group Minimised</th>
<th title="Send me a fault email when an issue occurs in this group">Send Fault Email</th>
</thead>
<tbody>
@foreach (MvcApplication2.Models.UserGroup group in user.Groups)
{
<tr>
<td>@group.GroupID</td>
<td>@group.GroupName</td>
<td><input class="SettingsDisplayGroup" type="checkbox" name="displayGroup" value="@group.DisplayGroup" @(group.DisplayGroup ? "checked=\"checked\"" : "")/></td>
<td><input class="SettingsMinimiseGroup" type="checkbox" name="minimiseGroup" value="@group.GroupMinimised" @(group.GroupMinimised ? "checked=\"checked\"" : "")/></td>
<td><input class="SettingsSendFaultEmail" type="checkbox" name="sendFaultEmail" value="@group.SendFaultEmail" @(group.SendFaultEmail ? "checked=\"checked\"" : "")/></td>
</tr>
}
</tbody>
</table>
<button id="saveUserGroupSettings">Save</button>
Any help appreciated