This is a migrated thread and some comments may be shown as answers.

Custom command not visible when back button is pressed in IE9

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Darren Mann
Top achievements
Rank 1
Darren Mann asked on 24 Jul 2012, 02:32 PM
Hi,

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

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 27 Jul 2012, 11:03 AM
Hi Darren,

 I cannot reproduce the problem in a test project. Could you please send us a small example which we can test?

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Darren Mann
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or