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

Grid setoptions / getoptions and functions

1 Answer 289 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Edu
Top achievements
Rank 1
Edu asked on 27 Mar 2019, 08:20 AM

Good Morning,

We are currently testing the Kendo Grid but we have encountered a couple of problems.

The first problem is with the function setOptions to save and retrieve the grid configuration. Because JSON.stringify does not work well with the functions we have reviewed in other post that there are libraries like super-json to be able to store these functions as a string. The problem is that when I recover and make the setOptions I get an error of "Error in v-on handler:" ReferenceError: templateDefinition is not defined ", we have tried both with this library and creating our own function to store functions within the localstorage. Is there an alternative? I use templates to customize the columns, therefore it is necessary to store functions in the "template" key

Our other problem is when grouped by a column appears the identifier in the description of the grouping, Is it possible to establish for example the name of the object associated with that group identifier or another attribute?

Thank you very much and greetings

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 29 Mar 2019, 08:35 AM
Hi Edu,

Thank you for the detailed explanation of the issue faced.

I am afraid that the limitation you have encountered could not be overcome with the current implementation of the Kendo Grid wrapper. The functions passed to the Grid initialization do not hold a reference to the actual column template definition. As a result the component could not be stored and later passed to the setOptions() call. In addition, I could not think of a viable workaround, that would allow you to achieve the desired.

What I could suggest you is to review our native implementation for a Vue Grid and test whether it will cover your needs. Here you will find a small sample using an external template.

As per your second question, may I ask you to explain a bit in detail what you are trying to achieve? If I am getting the question right, you may use the group-header-template to achieve the desired. Here you would find a small sample implementing such scenario.

I hope that this helps. If you have any other questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
Progress Telerik
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
Grid
Asked by
Edu
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or