I get the content of the DropDownList from a remote datasource. The received data looks different from the schema I have so I need to get the connection between the object of the column I'm in and the results from the request plus I need to bind that correctly that the text and value are correct in the cell but not with the original property names.
7 Answers, 1 is accepted
0
Hi Stefan,
Could you please provide the following additional information in order to get better overview of the exact setup that you have:
- example response that is returned from the server to the DropDownList
- example objects (data) from the Grid DataSource
- desired result after choosing value in the DropDownList (above object with the related property set)
- the current Grid code that you are using
Regards,
Vladimir Iliev
Telerik
Could you please provide the following additional information in order to get better overview of the exact setup that you have:
- example response that is returned from the server to the DropDownList
- example objects (data) from the Grid DataSource
- desired result after choosing value in the DropDownList (above object with the related property set)
- the current Grid code that you are using
Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
0
0
Accepted
Hi Stefan,
After reviewing the provided demo it seems that you should fix the following issues:
Regards,
Vladimir Iliev
Telerik
After reviewing the provided demo it seems that you should fix the following issues:
- Remove the "Category_formattedValue" and "Category_value" fields from the model
- Modify the "Category" column template as follows:
template:
"#=Category ? Category.formattedValue : ''#"
- Define "schema" for the dropDownList dataSource in order to make the items have the same propertied as "Category" field in the grid dataSource:
schema: {
model: {
fields: {
formattedValue: {from:
"Text"
},
value: {from:
"Value"
}
}
}
}
Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
.jpg)
CS
Top achievements
Rank 2
answered on 24 Jun 2014, 02:12 PM
The demo works. I made the changes in my project and it absolutly does not work, I only get entries of "undefined" in my case.
0
.jpg)
CS
Top achievements
Rank 2
answered on 24 Jun 2014, 02:15 PM
Is there a way to inspect/debug a dropdownlist in the way of pausing when the object is send to the select box just to see what got sent there and what was expected? Because it looks a bit like the mapping is not working correctly but I have no way to jump into the schema and verify that assumption.
0
.jpg)
CS
Top achievements
Rank 2
answered on 24 Jun 2014, 02:36 PM
Okay it now works, my schema slipped in the transport and caused that problem.