Declined
Last Updated: 01 Feb 2022 12:38 by Cypher
Cypher
Created on: 16 Jan 2022 23:20
Category: UI for ASP.NET Core
Type: Bug Report
0
Kendo Inputs changed values are not restored when a page is redisplayed

Steps to reproduce

  1. Execute the code below
  2. Enter some values in the Html and Kendo inputs
  3. Hit the browser's back button
  4. Hit the browser's forward button to redisplay the page

Current Behavior

The value in the Html Input is restored but not the value of the Kendo Input. The same behavior applies for Kendo NumericTextBox, etc.

 

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2021.3.1207/styles/kendo.bootstrap-v4.min.css" />
    <script src="https://kendo.cdn.telerik.com/2021.3.1207/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.3.1207/js/kendo.all.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.3.1207/js/kendo.aspnetmvc.min.js"></script>
  </head>
  <body>
    <form>
 
      <div>
        <label for="HtmlInput">Html Input</label>
        <input type="text" id="HtmlInput" name="HtmlInput">
      </div>
 
      <div>
        <label for="KendoInput">Kendo Input</label>
        @(Html.Kendo().TextBox ().Name ("KendoInput"))
      </div>
 
    </form>
  </body>
</html>

4 comments
Cypher
Posted on: 01 Feb 2022 12:38
Hi Stoyan,

Ok, I understand that the structure of telerik ui editors do not permit this behavior. Thanks for your reply.

As a side note, a refresh is equivalent to a GET whereas Back and Forward are equivalent to a GET + an Update from the browser's cache (as far as the latest chromium browsers are concerned). Back and Forward do go back to the server, easily demonstrated by a breakpoint or the display of a counter.

ADMIN
Stoyan
Posted on: 28 Jan 2022 15:13

Hello Netty,

This behavior is observed because when you hit 'back', the browser reloads the page as it was for your last POST to that page or your last 'GET' from that page. Please review the following stackexchange thread for more information.

Regular inputs are included in this but Telerik UI Editors aren't because of the way they are structured and wrapped. That being said the regular inputs aren't persistent either since the behavior you refer can be observed only when navigating back and forth to the page, but not when the page is refreshed, etc.

I hope this information is useful.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Cypher
Posted on: 22 Jan 2022 21:17

Ok Stoyan, no problem.

However, please notice how the value of HtmlInput is restored while KendoInput remains empty.

ADMIN
Stoyan
Posted on: 21 Jan 2022 12:29

Hello Netty,

The reported behavior is expected. To persist a value entered in an input by the user you would need to either use cookies or data persistŠµnce.

That being said this concept is valid across the web and isn't exclusive to Kendo and Telerik UI.

If you need further assistance with the set up of your application I would recommend our Professional Services.

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.