View @{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<fieldset>
<br />
<br />
<br />
<div align="center">
@{
@(Html.Telerik().Grid<SmartTrack.Web.DAL.SysUserList>()
.DataBinding(dataBinding => dataBinding.Ajax().Select("Index", "User"))
.Name("UserList")
.DataKeys(keys => keys
.Add(c => c.UserName)
.RouteKey("UserName"))
.Columns(columns =>
{
columns.Bound(o => o.UserName).Width(100);
columns.Bound(o => o.FirstName).Width(200);
columns.Bound(o => o.LastName).Width(250);
columns.Bound(o => o.Active).ClientTemplate("<input type='checkbox' disabled='disabled' name='Active' <#=Active? checked='checked' : '' #> />").Width(70).HtmlAttributes(new { style = "text-align:center" }); ;
})
.Pageable(pagerAction => pagerAction.PageSize(20))
.Sortable()
.Selectable()
.Scrollable()
.Groupable()
.Filterable()
.HtmlAttributes(new { style = "width:50%;" })
)
}
</div>
<br/>
<div align="center">
<table>
<tr>
<td>
<button id="btnAdd" type="submit" style="height:40px;width:70px" ">Add</button>
</td>
<td>
<button style="height:40px;width:70px" ">Edit</button>
</td>
<td>
<button style="height:40px;width:70px" ">Delete</button>
</td>
</tr>
</table>
</div>
</fieldset>
<script type="text/javascript">
$(function () {
$('#btnAdd').click(function () {
$.ajax({
type: "POST",
url: '@Url.Action("Create","User")',
success: function (result) {
$('#cuscreate').html(result)
}
});
});
});
</script>
Can someone tell me what is wrong with this script when button is click nothing happen. Blank UI is not displayed
Thanks in advance
Regards
Kurt