Problem:
- Html.Kendo().Grid
- Read.action routeValues not Working
@(Html.Kendo().Grid(Model.List)
.Name("list")
.Columns(columns =>
{
columns.Bound(p => p.Field1);
columns.Bound(p => p.Field2);
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Filterable()
.Pageable()
.HtmlAttributes(new { style = "heigth:250px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(false)
.Events(events => events.Error("errorHandler"))
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(false);
model.Field(p => p.Field1);
model.Field(p => p.Field2);
})
.Read(read => read.Action("Action", "Controlelr").Data("additionalInfo"))
)
)
<input name="submit" type="submit" id="RefreshGridButton" value="RefreshGridButton" class="k-button" />
$("#RefreshGridButton").click(function () {
var grid = $("#list").data("kendoGrid");
grid.dataSource.read();
return true;
});
function additionalInfo() {
return {
submit: "GridRefresh",
year: $("#Year").val(),
name: $("#Name").val(),
address $("#Address ").val()
}
}
Solution:
@(Html.Kendo().TabStrip()
.Name("tabstrip-images")
.Items(tabstrip =>
{
tabstrip.Add().Text("Tab Name")
.Content(Html.Action("Action", "Controller").ToString());
})
Sem comentários:
Enviar um comentário