Math, asked by TbiaSamishta, 11 months ago

how to pass value in select box of dxi item angular 4 devexpresss

Answers

Answered by Sidyandex
3

1. You can avoid creating a new object for the category field of the selectedCategory variable and assign the required item from the subcategories array to the variable instead:


[JavaScript]Open in popup window

this.selectedCategory.category = this.subcategories[1];


The plunk illustrates this approach.


2. You can go with the first approach from the dxSelectBox/dxLookup does not select an item if the valueExpr option is set to ""this"" and the value option is set programmatically article, i.e., use an ArrayStore as the dxSelectBox data source rather than specifying its items.

See the plunk that illustrates this approach.


3. You can have the category field of the selected Category variable hold the ID of selected category.

This is the second approach from the mentioned article.

See the plunk that demonstrates this approach.

Similar questions