Home General Discussion

When to view/viewpanels refresh ?

Jerry_VeldhuisJerry_Veldhuis Customer Advanced IT Monkey ✭✭✭
I have a custom viewpanel, which updates aren't getting to users.

Even after the nightly recycle of the app pool and users hit F5 and Ctrl-F5, the javascript defined "content" isn't being updated. I've had to ask users to bring up the chrome console and use the 'Empty Cache and Hard Reload' in order to force the page html and javascript to refresh.

I've also tried updating the 'Definitiion'->'content' value as well with the same results.
Is there a version # or some other stanza I can update to force an update ?

Best Answer

  • Jerry_VeldhuisJerry_Veldhuis Advanced IT Monkey ✭✭✭
    Accepted Answer
    Believe I figured out what was going on.

    I was using the following code to save the options from the grid:

        var grid = $("#grid").data("kendoGrid");
        localStorage["CreatedByMe-grid-options"] = kendo.stringify(grid.getOptions());

    Then upon refreshing, loading using:

        var options = localStorage["CreatedByMe-grid-options"];
        if (options) {
            var grid = $("#grid").data("kendoGrid");
            grid.setOptions(JSON.parse(options));

    I see now that the grid options also includes the columns definitions which included hyperlinks to the images used in the columns (and even cell data), so when i updated my code to use new image hyperlinks and refreshed the page (even full reloads) would not looked refreshed since the grid was having its options loaded from the local storage.

    Solution for me was to put a version # in the options loaded, and if it changes, clear out the localstorage value prior to applying to the grid.

    Thanks everyone.

Answers

  • Peter_SettlePeter_Settle Customer Advanced IT Monkey ✭✭✭
    Have you stopped and restarted the cachebuilder?
  • merlenette_jonesmerlenette_jones Member Advanced IT Monkey ✭✭✭
    Can you access the Dev tools on the browser and access the pageForm.viewModel
  • Jerry_VeldhuisJerry_Veldhuis Customer Advanced IT Monkey ✭✭✭
    Accepted Answer
    Believe I figured out what was going on.

    I was using the following code to save the options from the grid:

        var grid = $("#grid").data("kendoGrid");
        localStorage["CreatedByMe-grid-options"] = kendo.stringify(grid.getOptions());

    Then upon refreshing, loading using:

        var options = localStorage["CreatedByMe-grid-options"];
        if (options) {
            var grid = $("#grid").data("kendoGrid");
            grid.setOptions(JSON.parse(options));

    I see now that the grid options also includes the columns definitions which included hyperlinks to the images used in the columns (and even cell data), so when i updated my code to use new image hyperlinks and refreshed the page (even full reloads) would not looked refreshed since the grid was having its options loaded from the local storage.

    Solution for me was to put a version # in the options loaded, and if it changes, clear out the localstorage value prior to applying to the grid.

    Thanks everyone.

Sign In or Register to comment.