Declined
Last Updated: 05 Mar 2020 09:25 by ADMIN
Patrick
Created on: 16 Sep 2016 16:24
Category: Grid
Type: Feature Request
20
Add the ability for Kendo Grid's "colum.values" option to accept either an array of column values, or a function that returns the array
Currently, Kendo Grid has a "column.values" option that accepts an array of key/value pairs.  These values are used to render human-readable text for fields that are foreign keys.  Depending on how the grid is used, this array of "available values" could be dynamic.  Currently, there is no way to update these arrays without calling "setOptions" manually with the new, correct column definitions.

To fix this, Kendo Grid should track changes to the "column.value" array (via some sort of observable or something - I'm not sure exactly how things work under the hood).  Alternatively, "column.values" could also accept a function.  This function would return the up-to-date values array (Kendo Grid would have to be smart enough to execute the function whenever necessary).

Note:  this is the same functionality that has been requested by http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/13355043-kendogrid-allow-updating-columns-values-array-nee
1 comment
ADMIN
Angel Petrov
Posted on: 05 Mar 2020 09:25

Hello,

Generally the column.values are not used just to render the grid cell in a more readable format. They are used in the filter and column menus and editable widgets which are initialized. Meaning that if the data for the column changes according to the configuration a certain number of widgets should be re-initialized, a process in which they may loose their current state(example some style is applied using JavaScript and it will be cleared) which is not desirable.

For now what we can suggest is to manually rebuild the UI after changing the column values as shown in this dojo.

Regards,
Angel Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.