Hi,
I've got a grid with a custom command that redirects the user to a details page.
In IE9 when you press the browser back button the "View" button is not visibile, its working for Firefox and Chrome however
Thanks
I've got a grid with a custom command that redirects the user to a details page.
@(Html.Kendo().Grid<
VehicleGroupGridRow
>()
.Name("VehicleGroupGrid")
.Columns(column =>
{
column.Bound(p => p.Title);
column.Command(command => {
command.Edit();
command.Destroy();
command.Custom("View").Click("onViewClick");
});
})
.ToolBar(commands => commands.Create())
.Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InLine))
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.Id))
.Create(create => create.Action("CreateVehicleGroup", "VehicleGroup"))
.Read(read => read.Action("GetVehicleGroups", "VehicleGroup"))
.Update(update => update.Action("UpdateVehicleGroup", "VehicleGroup"))
.Destroy(destroy => destroy.Action("DestroyVehicleGroup", "VehicleGroup"))
)
)
<script type=
"text/javascript"
>
function
onViewClick(e) {
e.preventDefault();
var
dataItem =
this
.dataItem($(e.currentTarget).closest(
"tr"
));
var
actionUrl =
"@Url.Action("
Details
", "
VehicleGroup
", new { Id = "
PLACEHOLDER
" })"
;
window.location = actionUrl.replace(
'PLACEHOLDER'
,dataItem.Id);
}
</script>
In IE9 when you press the browser back button the "View" button is not visibile, its working for Firefox and Chrome however
Thanks