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

change language without destroy

1 Answer 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bridge24
Top achievements
Rank 1
Bridge24 asked on 24 Feb 2017, 08:10 PM

Hi kendo team and users, I read that sample about changing the grid language, on that link:

http://demos.telerik.com/kendo-ui/grid/localization

I tried to edit that demo, and change the "full grid reconstruction" to a simple setOptions, and it seems to work:

http://dojo.telerik.com/@foxontherock/aJOBu/3

The $.getScripts replace the Grid prototype, so I just update the current gri messages from the prototype, like that:

grid.setOptions({
  messages: kendo.ui.Grid.prototype.options.messages
});

Do you suggest to use that method or not? possible memory leak or something else?

And, is it available for all other kendo components?

For now, everything works fine, and the language change seems faster than rebuilding the whole grid.

Thank you

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 28 Feb 2017, 04:32 PM
Hello Dani,

The setOptions method is not supported for all of the widgets. For these that have the method, it will not leak.

Additionally you may check the known issues about using setOptions in our public repository here:
https://github.com/telerik/kendo-ui-core/issues?q=is%3Aissue+setOptions+is%3Aopen

If you find an issue with memory leaking, please let us know, so we can fix it.

Regards,
Vasil
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Bridge24
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or