Hello. I am testing the product. It looks good but I found the first problem and could not resolve it.
I have a dropdown list
I have a method
But the result is that I have three values in dropdown list but all are with text undefined.
I have tried different scenarios... getting the data from DB or filling the static data like in this example but every time I get three items but undefined in the control...
The object color_data is correctly filled and has all three values...
Thank you for your help.
I have a dropdown list
<kendo-dropdownlist name="customer" style="width:100%"
datatextfield="Text"
datavaluefield="Value">
<datasource type="DataSourceTagHelperType.Custom">
<transport>
<read url="@Url.Action("GetCustomers", "Home")" />
</transport>
</datasource>
</kendo-dropdownlist>
I have a method
public JsonResult GetCustomers(string text)
{
//var customers = _context.Customers.ToList();
var color_data = new List<SelectListItem>()
{
new SelectListItem() {
Text = "Black",
Value = "1"
},
new SelectListItem() {
Text = "Orange",
Value = "2"
},
new SelectListItem() {
Text = "Grey",
Value = "3"
}
};
return Json(color_data);
}
I have tried different scenarios... getting the data from DB or filling the static data like in this example but every time I get three items but undefined in the control...
The object color_data is correctly filled and has all three values...
Thank you for your help.