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

Kendo tool Bar with Are you sure you want to leave this page JS file

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dilshad
Top achievements
Rank 1
dilshad asked on 12 Jul 2016, 09:43 PM

@(Html.Kendo().ToolBar()
    .Name("ToolBar")
    .Items(items =>
    {
        items.Add().Type(CommandType.Button).Id("saveButton").Text("Save").ImageUrl(Url.Content("~/Content/img/save.png")).Click("toolbarSaveClick");
        items.Add().Type(CommandType.Button).Id("backButton").Text("Back To List").ImageUrl(Url.Content("~/Content/img/leftarrow.png")).Click("backButtonClick");
    })
    .Deferred()
)

i have few controls on my page and with out saving the information entered and clicking on above back button in kendo tool bar i get a prompt saying are you sure you want to leave this page or stay on this page.

So when i click on kendo tool bar back button and prompts and if i selects stay on this page 

my code breaks for below code and after that it stays in page and nothing happens in that page means it wont allow me to save that information.

function backButtonClick(e) {    
    document.location.href = $("#RedirectToIndex").val();    
    }

This problem is not there with html button or kendo button.

Problem is with kendo toolbar and button inside that.

 

waiting for your response.

 

Thanks,

Dilshad

1 Answer, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 15 Jul 2016, 09:03 AM
Hello Dilshad,

You have submitted your technical inquiry under the Telerik Platform product. Telerik Platform  is an end-to-end solution for building and distributing mobile applications with a set of application development tools and services.

I am afraid that Telerik Platform does not include support for the product you are referring to (in this case UI for ASP.NET MVC) and we cannot provide a resolution for your technical question. That is why I'd suggest that you consult the respective product forums here (requires a license) or community forums. 

Regards,
Anton Dobrev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
dilshad
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Share this question
or