This question is locked. New answers and comments are not allowed.
How do you iterate over the results of an xml datasource. I can see the results if I bind a list to this datasource, but say for instance I want to insert a list with a different innerhtml string for a certain optTypeID from the datasource below. How would I achieve that in a function call named processInfo?
var dsDet
dsDet = new kendo.data.DataSource({
transport: {
read: "Details.xml"
},
schema: {
type: "xml",
data: "/Category/Field",
model: {
fields: {
name: "@Name",
displayName: "@DisplayName",
value: "@Value",
optTypeID: "@OptTypeID"
}
}
}
});
function processInfo()
{
Need a loop here to look through the results and if the optTypeID=1 for instance I want to insert
<li> test1</li> into a div.
If optTypeID=2 then insert
<li> test2</li> into a div.
}
Any help would be greatly appreciated.
Thanks
var dsDet
dsDet = new kendo.data.DataSource({
transport: {
read: "Details.xml"
},
schema: {
type: "xml",
data: "/Category/Field",
model: {
fields: {
name: "@Name",
displayName: "@DisplayName",
value: "@Value",
optTypeID: "@OptTypeID"
}
}
}
});
function processInfo()
{
Need a loop here to look through the results and if the optTypeID=1 for instance I want to insert
<li> test1</li> into a div.
If optTypeID=2 then insert
<li> test2</li> into a div.
}
Any help would be greatly appreciated.
Thanks