I'm have a my input text:
<input type="text" id="txtSearch" class="form-control" placeholder="Buscar" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="Search()">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
And my javascript
function Search() {
$.ajax({
type: "POST",
url: '@Url.Content("~/groups/Search")',
data: JSON.stringify({ Search: $('#txtSearch').val() }),
contentType: "application/json",
dataType: "JSON",
success: function (result) {
$('#grid').data("kendoGrid").dataSource.data(JSON.parse(result));
}
});
}
But, return error :/
Sugest?
<input type="text" id="txtSearch" class="form-control" placeholder="Buscar" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="Search()">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
And my javascript
function Search() {
$.ajax({
type: "POST",
url: '@Url.Content("~/groups/Search")',
data: JSON.stringify({ Search: $('#txtSearch').val() }),
contentType: "application/json",
dataType: "JSON",
success: function (result) {
$('#grid').data("kendoGrid").dataSource.data(JSON.parse(result));
}
});
}
But, return error :/
Sugest?