Completed
Last Updated: 07 Jun 2021 07:54 by ADMIN
Dan
Created on: 15 Mar 2017 19:23
Category: UI for ASP.NET MVC
Type: Feature Request
2
support binding combobox to an object in standard form
In order to use a kendo combobox in an editable kendo grid, you have to bind it to an object with two properties (1 for the value and 1 for the text) - unless you happen to be in the fairly unusual scenario where the value and text are the same.

However, in a standard form, you can only bind a kendo combobox to a primitive type for the value.  There is no way to bind to an object, which is required in the context of a kendo grid. 

So what is required in the grid, is not supported in a standard form.  I don't understand the complexities of why that is, but this inconsistency does not make for a good developer experience.  It results in either creating different EditorTemplates for the two cases, or binding to the generic "object" - which introduces other challenges / issues.  Also - it means there is no good way to post the text back to the server when the kendo combobox is used in a standard form.

See here for more details:
https://www.telerik.com/account/support-tickets/view-ticket?threadid=609934
1 comment
ADMIN
Ianko
Posted on: 07 Jun 2021 07:54

Hi Dan,

As discussed in the support ticket, it is the Form that limits the Form fields to accept only primitive values. There is no technical approach to bind a ComboBox to an object in a form. What you can accomplish is to bind the value to the primitive value that comes from the form input and have remote data binding in order to bind the list to a set of objects. However, the submitted value in the form will be again a primitive value as this is how the form works. 

You can alternatively use hidden fields to populate the object fields on ComboBox change, but this is a custom solution that requires additional form adjustment based to the object you need to bind it to.

Regards,
Ianko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.