Here is a jsfiddle (not mine, but same error).
http://jsfiddle.net/grenal/KGsSL/73/
<script id="popup_editor" type="text/x-kendo-template">
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="197" scope="row">Chapter Name</th>
<td width="403"><label for="chapterName"></label>
<input type="text" name="chapterName" id="chapterName" data-bind="source: chaptername"></td>
</tr>
<tr>
<th scope="row">State</th>
<td><label for="state"></label>
<input type="text" name="state" id="state" data-bind="source: state"></td>
</tr>
<tr>
<th scope="row">Code</th>
<td><label for="code"></label>
<input type="text" name="code" id="code" data-bind="source: code"></td>
</tr>
<tr>
<th scope="row">Date Added</th>
<td><label for="dateadded"></label>
<input type="text" name="dateadded" id="dateadded" data-bind="source: dateadded"></td>
</tr>
<tr>
<th scope="row">Active</th>
<td><label for="active"></label>
<input type="text" name="active" id="active" data-bind="source: active"></td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
</tr>
<tr>
<th scope="row">Approved</th>
<td><label for="approved"></label>
<input type="text" name="approved" id="approved" data-bind="source: approved"></td>
</tr>
<tr>
<th scope="row">Chapter Price</th>
<td><label for="chapterPrice"></label>
<input type="text" name="chapterPrice" id="chapterPrice" data-bind="source: chapterPrice"></td>
</tr>
<tr>
<th scope="row">Parent Price</th>
<td><label for="parentPrice"></label>
<input type="text" name="parentPrice" id="parentPrice" data-bind="source: parentPrice"></td>
</tr>
</table>
</script>
$(document).ready(function() {
$("#search").click(function() {
// alert("clicked refresh");
$("#grid").data("kendoGrid").dataSource.read();
});
$("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: "chaptersJson.cfm",
dataType: "json",
data: {q: function() { return $("#chapterName").val();}}
},
update: {
url: "chaptersJson.cfm?pageaction=Update",
dataType: "json"
}
},
schema: {
model: {
id: "chapterid",
fields: {
chapterid: { type:"number" },
chaptername: { type: "string" },
active: {type: "string"},
approved: {type: "string"},
chapterPrice: {type: "string"},
parentPrice: {type:"string"},
code: {type:"string"},
dateadded: {type:"date"},
state: {type:"string"}
}
}
},
pageSize: 25
},
height: 500,
filterable: false,
sortable: true,
pageable: true,
columns: [{field: "chaptername", title: "Chapter", width: 200},
{field: "state", title:"State", width: 100},
{field: "chapterPrice", title:"Chapter Price", width: 100},
{field: "parentPrice", title:"Parent Price", width: 100},
{field: "dateadded", title:"Added On", width: 100, template: '#= kendo.toString(dateadded,"MM/dd/yyyy") #'},
{command: ["edit"], title:" ", width:"210px"}
],
editable: {mode: "popup", template: $("#popup_editor").html()}
});
});
</script>
When you try to open the popup and then click the X to close or the cancel button, it doesnt close and returns:
Uncaught TypeError: ----------- has no method 'unbind'
I'm basically creating a regular grid with KendoUI, but I wanted a custom popup editor to show more fields that the grid currently does.
Update the version and the error should disappear (because it's fixed).
Basically you just need to change the script and style references to point to version 913 instead of 710.
e.g.
<script src="http://cdn.kendostatic.com/2012.2.913/js/kendo.core.min.js"></script>
Related
I have a form:
<form name="employeeForm" method="post">
<table cellpadding="0" cellspacing="0" border="1" class="GridOne">
<tr>
<td>First Name</td>
<td><input type="text" name="firstName" id="firstName" value="" onchange="FirstNameAjaxCall(event);"></td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" name="lastName" id="lastName" value=""></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" id="email" value=""></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" value="Ajax Submit" onclick="madeAjaxCall(event);"></td>
</tr>
</table>
</form>
//====================================================
and my controller:
#RequestMapping(value="/ajaxExample", method=RequestMethod.POST)
public #ResponseBody ModelAndView firstnameAjaxTest(#RequestParam(value="text") String text) {
final ModelAndView modelAndView = new ModelAndView();
System.out.println(text);
modelAndView.setViewName("ajaxExample");
return modelAndView;
}
//===============================================
and script
function FirstNameAjaxCall(e){
e.preventDefault();
var text = document.getElementById('firstName').value;
alert(text);
$.ajax({
type: "POST",
url: "http://localhost:8080/ajaxExample",
cache: false,
dataType: 'text',
data:{
text:text
},
success: function(){
alert('Done');
},
error: function(){
alert('Error while request..');
}
});
return false;
return false;
}
And request return msg: Error while request..
I doesn understand why.
Please help me
I have Datatable with server-side (MVC.net) paging, sorting, column filter and global search as follows
Html code
<table id="Grid" class="dataTable table table-striped table-bordered " style="width: 100% !important">
<thead>
<tr>
<th>Name</th>
<th>Name2</th>
<th>name3</th>
<th>name4</th>
<th>name5</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>last name</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th> <input class="form-control texts" type="text" placeholder="Filter Name" id="filter0" maxlength="180" /></th>
<th> <input class="form-control texts" type="text" placeholder="Filter Host" id="filter1" maxlength="180" /></th>
<th> <select class="form-control selects" id="filter2">
<option value="select">Select</option>
<option value="1">2</option>
<option value="2">2</option>
</select> </th>
<th>
<select class="form-control selects" id="filter3">
<option value="select">Select</option>
<option value="1">true</option>
<option value="2">false/option>
</select>
</th>
<th><select class="form-control selects" id="filter4">
<option value="select">Select</option>
<option value="True">True</option>
<option value="false">False</option>
</select>
</th>
<th>
<select class="form-control selects" id="filter5">
<option value="select">Select</option>
<option value="True">True</option>
<option value="false">False</option>
</select>
</th>
<th></th>
<th></th>
<th>
<div class='input-group date col-xs-9' id="datepicker2">
<input class="form-control datepicker texts" type="text" placeholder="Filter Key expiration date" id="filter8" maxlength="10" />
<span class="input-group-addon">
<span class="ebsi-icon-calendar"></span>
</span>
</div>
</th>
<th>
<div class="btn-group btn-group-xs pull-right">
<input id="btnColumnFilters" class="datatable-action btn btn-sm btn-primary btn-secondary" type="button" value="Filter"/>
<input id="btnClearColumnFilters" class="datatable-action btn-sm btn btn-grey btn-secondary" type="button" value="Clear"/>
</div>
</th>
</tr>
<tfoot>
</table>
javascript code :
var ConfigTable = $('#Grid')
.on('preXhr.dt', function(e, settings, data) {
$(".alert").hide(); // hide any alerts
})
.DataTable({
autoWidth: true,
lengthChange: false,
responsive: true,
searching: true,
ordering: true,
paging: true,
pageLength: 10,
serverSide: true,
order: [[0, "asc"]],
ajax: {
url: "/controller/action",
type: "POST",
datatype: "json",
error: function (xhr, error, thrown) {
},
data: function(d) {
return $.extend({},
d,
{
});
}
},
columns: [
{ "data": "Name", "name": "Name", "autoWidth": true, "searchable": true },
{ "data": "Name2", "title": "Name2", "name": "Name2", "autoWidth": true, "searchable": true }.....
]
});
Column filter on button click
//send column filter data on button click
$("#btnColumnFilters").click(function() {
filterColumns.map(function (key, value) {
ConfigTable = ConfigTable.column(key).search($("#filter" + key).val());
});
ConfigTable.draw();
});
//server side search only when user hits enter or previous input has been cleared
$('#Grid_filter input').unbind();
$('#Grid_filter input').bind('keyup', function(e) {
if (e.keyCode == 13 || $(this).val() == "") {
// clear all filter selection
resetColumnFilters();
//apply filters
ConfigTable.columns().search(this.value).draw();
}
});
server-side code
[HttpPost]
public JsonResult action(jQueryDataTableParamModel param)
{
//globla filter
var search = Request.Form.GetValues("search[value]")[0];
// column filter
var Name = Request.Form.GetValues("columns[0][search][value]")[0];
}
but I am not getting global search value in "Request.Form.GetValues("search[value]")[0]" on the server side. it always comes as an empty string. what might be the issue, please help.
I am using 1.10.2 version of datatable plugin.
Update 1:
Checked in network tab of firebug for ajax request, empty string is being sent for each request for search parameter, even if search value is there
search[value] : ""
Update 2:
If I remove code to send global filter value only when enter is hit, it sends the search value to server
Update 3:
alert on this.value gives a value but
ConfigTable.columns().search(this.value).draw(); does not send value to server
Found the solution. removed columns() while sending global filter
$('#Grid_filter input').bind('keyup', function(e) {
if (e.keyCode == 13 || $(this).val() == "") {
// clear all filter selection
resetColumnFilters();
//removed columns()
ConfigTable.search(this.value).draw();
}
});
I am implementing datatable. I can see data is coming from database in xhr using developer tools but it is not showing in the table. Please tell me what is the problem with my code.
#section Body{
<div class="row">
<div class="col-md-9">
<div class="block">
<div class="content">
<table cellpadding="0" cellspacing="0" width="100%" class="table" id="myDbTable">
<thead>
<tr>
<th data-hide>ID</th>
<th data-hide >Name</th>
<th data-hide >E-mail</th>
<th data-hide>Phone</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
}
#section Scripts{
<script>
var DataColumnsCount = 4;
//***Start Fatching Data for datatable *** start //
function fetchEmployeeTableList() {
$('#myDbTable').DataTable({
"columns": [
{"data" : "Id"},
{ "data": "Name" },
{ "data": "Email" },
{ "data": "Phone" }
]
}
);
}
$.ajax({
type: 'GET',
url: "#Url.Action("GetEmployees","Employee")",
dataType: 'json',
data: "{}",
dataSrc: 'DataSet',
success: fetchEmployeeTableList});
</script>
}
Please help me in this regard.
I have several individual charts, and have disabled all the axi (axises?) so that I can have a simple stacked bar in each cell of a table:
http://jsfiddle.net/hCb8C/3/
According to this forum, the chart should adopt the width of its parent element. I've tried setting both an explicit width and 100% on the chart, and wrapped each chart in a div with an explicit width. However, from the fiddle if you scroll to the third column Test you can see the widths vary, and it looks really sloppy. I would like to just set an explicit fixed number of pixels for the chart. Eventually I'm going to calculate a width for each based on highest relative Total so they are scaled properly. However before I get that far, I need to at least get them to respect the width setting.
How can I get all of the charts to respect the width setting?
$(function(){
$(".chart").each(function (index) {
var current = $(this)
var chart = current.kendoChart({
title: {
text: "Compliance",
visible: false
},
legend: {
visible: false
},
seriesDefaults: {
type: "bar",
stack: true,
gap: 0
},
series: [
{
name: "Compliant",
data: [current.data("compliant-count")],
color: "#00ff00",
tooltip: {
background: '#88ff88'
}
},
{
name: "Incomplete",
data: [current.data("incomplete-count")],
color: "#cccccc",
tooltip: {
background: '#e7e7e7'
}
},
{
name: "Non-compliant",
data: [current.data("noncompliant-count")],
color: "#ff0000",
tooltip: {
background: '#ff8888'
}
}
],
valueAxis: {
visible: false,
line: {
visible: false
},
minorGridLines: {
visible: false
},
majorGridLines: {
visible: false
}
},
categoryAxis: {
visible: false,
minorGridLines: {
visible: false
},
majorGridLines: {
visible: false
}
},
tooltip: {
visible: true,
template: "<b>#= value #</b> <br /> #= series.name #"
}
}).data("kendoChart");
chart._tooltip.options.animation.duration = 0;//disable stupid tooltip animations
});//foreach chart
});
HTML:
<div class="pivot-container">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th class="rowLabel"></th>
<th class="th-md"><b>test category</b>
</th>
<th class="th-md"><b>Sprint 48</b>
</th>
<th class="th-md"><b>Test</b>
</th>
</tr>
</thead>
<tbody>
<tr class="learnerGroupRow" data-group-member-id="28">
<td class="rowLabel"><b>Corporate</b>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="1" data-incomplete-count="0" data-noncompliant-count="2" data-total="3"></div>
</div>
</td>
<td></td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="4" data-incomplete-count="2" data-noncompliant-count="9" data-total="15"></div>
</div>
</td>
</tr>
<tr class="learnerGroupRow" data-group-member-id="7">
<td class="rowLabel"><b>
Dave Test Group 1
</b>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="0" data-noncompliant-count="3" data-total="3"></div>
</div>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="1" data-incomplete-count="0" data-noncompliant-count="2" data-total="3"></div>
</div>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="3" data-noncompliant-count="14" data-total="17"></div>
</div>
</td>
</tr>
<tr class="learnerGroupRow" data-group-member-id="970">
<td class="rowLabel"><b>
Managed
</b>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="0" data-noncompliant-count="3" data-total="3"></div>
</div>
</td>
<td></td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="2" data-noncompliant-count="12" data-total="14"></div>
</div>
</td>
</tr>
<tr class="learnerGroupRow" data-group-member-id="0">
<td class="rowLabel"><b>
Other
</b>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="0" data-noncompliant-count="14" data-total="14"></div>
</div>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="0" data-noncompliant-count="1" data-total="1"></div>
</div>
</td>
<td class="td-md">
<div style="width:220px">
<div class="chart" data-compliant-count="0" data-incomplete-count="13" data-noncompliant-count="59" data-total="72"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
CSS:
div.pivot-container {
width: 100%;
overflow-x: scroll;
overflow-y: visible;
}
div.pivot-container table {
border-collapse: separate;
table-layout: fixed;
}
.pivot-container td {
padding:2px;
margin:0px;
}
.rowLabel {
width: 230px;
height:30px;
}
.td-md {
width: 230px;
height:30px;
}
.chart {
width: 100%;
height:30px;
}
This line in your css is causing a border on the left side of some of the cells:
border-collapse: separate;
If you remove it the cells will be left aligned.
As for the width, you have 3 series defined. If the values are
14|2|3
12|1|1
Then the top bar will be longer by 5 ticks. I think you are looking for a 100% stacked bar. At least you can probably make an extra series to make up the slack to a shared max like 100%.
Also, if you set the valueAxis property likewise:
valueAxis: {
visible: false,
},
You can see it is drawing to 100% you just don't have any indication on the right.
I figured it out. Even though the valueAxis was hidden, it was still being generated, so a bar of 75 items long would have a value axis with ticks up to 90. I fixed this by explicitely setting the valueAxis max property to whatever the total items was for that stacked bar:
http://jsfiddle.net/hCb8C/4/
valueAxis: {
max: current.data("total"),
visible: false,
line: {
visible: false
},
minorGridLines: {
visible: false
},
majorGridLines: {
visible: false
}
},
I'm trying to have some Ajax form in the page which is not working at all, it does not send any requests on submit, noting in firebug, the form is being loaded to page by ajax, but I have other forms which are loaded to form by ajax into a jquery UI dialog and they are working fine, here is my whole partial view code , (the Part with action "SeacrhTasksTable" not working) I'd attach the rendered the whole HTML but it's so big.
#model APS.HelpDesk.UI.MyModel<APS.HelpDesk.Data.App_ProjectTask>
<h2>
پروژه
#ViewBag.ProjectTitle
</h2>
<div class="wrapperTask">
<div class="firstTask">
#* <input type="hidden" value="#(ViewBag.ProjectId)" />*#
#Ajax.ActionLink("تعریف کار جدید", "AddProjectTaskDialog", new
{
Id = ViewBag.ProjectId,
area = "ProjectAdmin"
}, new AjaxOptions()
{
HttpMethod = "GET",
LoadingElementId = "AddProjectTaskLoadingGif",
UpdateTargetId = "AddProjectTaskDialog",
InsertionMode = InsertionMode.Replace,
OnBegin = "clearDialogs();",
OnSuccess = " $('#AddProjectTaskDialog').dialog('open');"
}, new { id = "AddProjecTaskLink" })
بارگذاری مجدد جدول
</div>
<div class="secondTask">
<div id="AddProjectTaskLoadingGif" style="display: none;">
<img src="#Url.Content("~/Content/Images/ajax-loader/253L.gif")" alt="" />
</div>
</div>
</div>
<div id="test">
<table>
<tr>
<th>
#
</th>
<th>
کد کار
</th>
<th>
عنوان کار
</th>
<th style="min-width: 300px;">
مختصری از توضيحات
</th>
<th>
تاريخ ايجاد کار
</th>
<th>
مهلت انجام
</th>
<th>
وضعيت
</th>
<th>
وابستگی های کار
</th>
<th colspan="2">
ويرايش و حذف
</th>
</tr>
#using (Ajax.BeginForm("SeacrhTasksTable", new { area = "ProjectAdmin" }, new AjaxOptions
{
HttpMethod = "POST",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "test"
}))
{
<tr>
<td>
</td>
<td>
<input type="text" id="IdTask" style = "width:40px" name = "Id" />
</td>
<td>
<input type="text" id="TitleTask" style = "width:80%;" placeholder = "جست و جو" name = "Title" />
</td>
<td style="min-width: 250px;">
<input type="text" id="DescriptionTask" style = "width:80%;" placeholder = "جست و جو" name = "Description" />
</td>
<td>
<input type="text" id="DeliverDateTask" style = "width:80%;" placeholder = "جست و جو" name = "DeliverDate" />
</td>
<td>
<input type="text" id="DeadlineDateTask" style = "width:80%;" placeholder = "جست و جو" name = "DeadlineDate" />
</td>
<td>
<select name="Status">
<option value="0"> همه</option>
<option value="1">شروع نشده</option>
<option value="2">در حال انجام</option>
<option value="3">تمام شده</option>
<option value="4">بی مسئول</option>
</select>
</td>
<td colspan="4">
<input type="submit" value="submit" style="" />
<input type="hidden" value="#(ViewBag.ProjectId)" name="ProjectId" id ="ProjectIdTask"/>
</td>
</tr>
}
<tbody id="TaskList">
#Html.Partial("_ProjectTaskList", Model.MyList)
</tbody>
<tfoot>
<tr>
<td colspan="3">
صفحه
#(Model.PageIndex + 1)
از
#Model.TotalPages
[ تعداد کل : #Model.TotalCount ]
</td>
<td id="pagesizeTaskTd" style="text-align: center;">
سايز صفحه
<select id="pagesizeTask">
<option value="5">5</option>
<option value="10" selected="selected">10</option>
<option value="25">25</option>
<option value="50">50</option>
</select>
</td>
<td colspan="6" align="left" class="tfoot-padding" id="morepagesTask">
#{
int start = Model.PageIndex;
if (start > 0)
{
int c = 0;
while (start > 0 && c < 4)
{
c++;
start--;
}
}
for (int j = start; j < Model.TotalPages && j < start + 10; j++)
{
if (Model.PageIndex != j)
{
<span>
#Ajax.ActionLink((j + 1).ToString(), "TaskListTablePage", "Project", new
{
Id = ViewBag.ProjectId,
PageIndex = j,
PageSize = Model.PageSize,
area = "ProjectAdmin"
}, new AjaxOptions
{
HttpMethod = "GET",
UpdateTargetId = "test",
InsertionMode = InsertionMode.Replace
}, new { mode = "mode" })
</span>
}
else
{
<span><b style="text-decoration: underline;">#(j + 1)</b></span>
<input type="hidden" id="PIndexAll" value="#(j)" />
}
}
if (Model.PageIndex + 10 < Model.TotalPages)
{
<span>. . . </span>
}
}
</td>
</tr>
</tfoot>
</table>
</div>
<div id="AddProjectTaskDialog" title="تعریف کار جدید" style="text-align: right;">
</div>
<div id="EditProjectTaskDialog" title="ويرايش کار" style="text-align: right;">
</div>
<div id="ReportProjectTaskDialog" title="گزارش کل کار" style="text-align: right;">
</div>
<div id="DescriptionProjectTaskDialog" title="توضيح کار" style="text-align: right;">
</div>
<div id="EditProjectDepenDialog" style="text-align: right;">
</div>
<div id="Taskresult">
</div>
<script type="text/javascript">
$("#AddProjectTaskDialog").dialog({
autoOpen: false,
width: 720,
modal: true,
draggable: true,
position: "top"
});
$("#EditProjectTaskDialog").dialog({
autoOpen: false,
width: 720,
modal: true,
draggable: true,
position: "top"
});
$("#EditProjectDepenDialog").dialog({
autoOpen: false,
width: 720,
modal: true,
draggable: true,
position: "top",
buttons: {
"OK": function () {
$(this).dialog("close");
}
}
});
$("#AddProjecTaskLink").button();
$("#resetbutton").button();
$("#pagesizeTask").live( 'change' , function (){
var val = $(this).find(":selected").val();
$("#morepagesTask").find('*[mode]').each(function(index){
var n=$(this).attr("href").lastIndexOf("=");
var t= $(this).attr("href").substring(0,n+1);
$(this).attr("href" ,t+val );
});
var url = '#Url.Action("TaskListTablePage", new { area = "ProjectAdmin" })';
url += '?Id=' + #(ViewBag.ProjectId);
url += '&PageIndex=' + $("#PIndexAll").val();
url += '&PageSize=' +val;
$.ajax({
url: url, type: 'get',
success: function (data, status) {
$("#test").html('');
$("#test").html(data);
}
});
});
$(".firstTask").delegate( '#resetbutton','click',function(){
var url = '#Url.Action("TaskListTablePage", new { area = "ProjectAdmin" })';
url += '?Id=' + #(ViewBag.ProjectId);
url += '&PageIndex=0' ;
url += '&PageSize=10';
$.ajax({
url: url, type: 'get',
success: function (data, status) {
$("#test").html('');
$("#test" ).html(data);
}
});
});
</script>
HTML of Form
<form action="/ProjectAdmin/Project/SeacrhTasksTable" data-ajax="true" data-ajax-method="POST" data-ajax-mode="replace" data-ajax-update="#test" id="form0" method="post"> <tr>
<td>
</td>
<td>
<input type="text" id="IdTask" style = "width:40px" name = "Id" />
</td>
<td>
<input type="text" id="TitleTask" style = "width:80%;" placeholder = "جست و جو" name = "Title" />
</td>
<td style="min-width: 250px;">
<input type="text" id="DescriptionTask" style = "width:80%;" placeholder = "جست و جو" name = "Description" />
</td>
<td>
<input type="text" id="DeliverDateTask" style = "width:80%;" placeholder = "جست و جو" name = "DeliverDate" />
</td>
<td>
<input type="text" id="DeadlineDateTask" style = "width:80%;" placeholder = "جست و جو" name = "DeadlineDate" />
</td>
<td>
<select name="Status">
<option value="0"> همه</option>
<option value="1">شروع نشده</option>
<option value="2">در حال انجام</option>
<option value="3">تمام شده</option>
<option value="4">بی مسئول</option>
</select>
</td>
<td colspan="4">
<input type="submit" value="submit" style="" />
<input type="hidden" value="38" name="ProjectId" id ="ProjectIdTask"/>
</td>
</tr>
</form>
Your code doesn't work because you have invalid markup. By invalid markup I mean that you have a <form> nested directly inside a <tr> which is forbidden by the specification. You cannot have a <form> inside a <table>, <tbody> or <tr>.
To illustrate the problem in a simplified manner, here's what you have currently which is invalid:
<table>
<tr>
<form>
<td>Foo</td>
<td>Bar</td>
<td><input type="submit" /></td>
</form>
</tr>
</table>
Just inspect the DOM with FireBug and you will see how your <form> is floating alone (opening and closing immediately) without any elements inside.
This is invalid markup and it results in undefined behavior which in your case translates by the browser simply not submitting the form. The reason this happens is because the unobtrusive-ajax library that you are using subscribes to the submit event to all ajax forms using a .live:
$("form[data-ajax=true]").live("submit", function (evt) {
...
});
The thing is that the submit event is never raised in this case. A similar question has been asked yesterday with the same problem.
To fix this problem you could use nested tables:
<table>
<tr>
<td>
<form>
<table>
<tr>
<td>Foo</td>
<td>Bar</td>
<td><input type="submit" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
So simply put your Ajax.BeginForm inside a <td> and then use a nested table to put the elements.