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

Validation Dropdown list Data binding

1 Answer 245 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 02 Dec 2016, 10:20 AM

I want to bind dynamic data to a validation list - is there an easy way to do this? The data will be an array of objects, with id/value pairs and in the dropdown list I'd like to show the value, but store the ID.

I'm using (where valueList is an array which I want to be databound) :

 

validation {
   dataType: "list",
   showButton: true,
   comparerType: "list",
   from: valueList,
   allowNulls: true,
   type: "reject"
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 06 Dec 2016, 09:04 AM
Hello Marc,

The described scenario to dynamically bound the DropDown editor to an array of objects is not supported from the Kendo UI Spreadsheet custom editor.

As stated in our documentation the sheets.rows.cells.validation.from property of the Spreadsheet can accept only string values:

http://docs.telerik.com/kendo-ui/api/javascript/ui/spreadsheet#configuration-sheets.rows.cells.validation.from

Also, when a new data is set to the from property, the Spreadsheet will not re-rendered automatically, this will require destroying and re-creating the widget which will not be very good from performance point of view.

I can suggest submitting a feature request in our UserVoice portal describing the desired functionality, and based on its popularity we may implement it in a future release:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback

Let me know if you need additional information on this matter.

Regards,
Stefan
Telerik by Progress
Kendo UI is ready for Visual Studio 2017 RC! Learn more.
Tags
Spreadsheet
Asked by
Marc
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or