Validation Dropdown list Data binding

2 posts, 1 answers
  1. Marc
    Marc avatar
    171 posts
    Member since:
    Sep 2016

    Posted 02 Dec 2016 Link to this post

    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"
    }

  2. Answer
    Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 06 Dec 2016 Link to this post

    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.
Back to Top