angularkendo-ui-angular2

The usage of ValuePrimitive in Kendo-ComboBox


What is the real advantage of valuePrimitive attribute in kendo-combobox angular. I need the advantages of this attribute with some code examples of this attribute using


Solution

  • I think that it depends on your model, for example

    imagine you have a form with two combos.

    the Object for the form would be like

    { Combo1:{value:1,text:"One"}, Combo2:{value:3,text:"Three"}}
    

    but in your post you need to send only the ids

    { Combo1:1, Combo2:3}
    

    It would be simpler to store only the primitive and send back only the ids.

    In my cases I have objects with related objects and with enums, my enums are displayed with a combo set to ValuePrimitive.