0

I have a kendo-vue-grid like so:

    <kendo-grid v-bind:data-source="loggedInUsers"
                v-bind:sortable-mode="'multiple'"
                v-bind:sortable-allow-unsort="false"
                v-bind:sortable-show-indexes="true"
                v-bind:height="250">
        <kendo-grid-column field="username" title="Agent Name">
        </kendo-grid-column>
        <kendo-grid-column field="count" title="Count">
        </kendo-grid-column>
    </kendo-grid>

loggedInUsers which is used as datasource in above contains elements like: { username: 'test', count: 1 } .

My problem is that this loggedInUsers array gets updated every five seconds and when it gets updated, all the sorting that is done on columns gets lost. Is there a way to preserve this sort settings?

AbbasFaisal
  • 1,428
  • 2
  • 18
  • 21

1 Answers1

0

In case with Kendo Vue Wrapper Grid you will have to save the the state in a similar way as it is done in this example - instead of cookie you could use your state management system.

You could also check the new Native Kendo Vue Grid that is built specially for Vue cases from the ground and has no dependency to jQuery. It has a sort prop that can be saved and used in the state management system.

Plamen Zdravkov
  • 748
  • 5
  • 7