Hi,
Just sampling your UI and it seems to be just what I am after. I have tried as the first project to use a combo box. Firstly I got the box working using your example on my site, now I am trying to bind a JSON data source to it.
the box initializes OK, but the values are filled with "undefined".
The code used to start the box is as follows:
<script type=
"text/javascript"
>
$(document).ready(
function
() {
$(
"#titles"
).kendoComboBox({
index: 0,
dataTextField:
"name"
,
dataValueField:
"value"
,
filter:
"q"
,
dataSource: {
type:
"json"
,
serverFiltering:
true
,
serverPaging:
true
,
pageSize: 20,
transport: {
}
}
});
});
</script>
The data being returned by the script is as below. i am not sure what the top level element in the JSON should be>? I set it to dataSource? Maybe this is the problem?
Also my script accepts a query string with q= , so the filter should be set to q?
Also its not reading cross domain, its all on the same domain, so json is the correct type?
{
"dataSource"
:[ {
"value"
:
"1366"
,
"name"
:
"TAD1341GE "
},{
"value"
:
"1367"
,
"name"
:
"TAD1342GE "
},{
"value"
:
"1368"
,
"name"
:
"TAD1343GE "
},{
"value"
:
"1369"
,
"name"
:
"TAD1344GE "
},{
"value"
:
"1370"
,
"name"
:
"TAD1345GE "
},{
"value"
:
"943"
,
"name"
:
"TAD1640GE "
},{
"value"
:
"944"
,
"name"
:
"TAD1641GE "
},{
"value"
:
"945"
,
"name"
:
"TAD1642GE "
},{
"value"
:
"1254"
,
"name"
:
"TAD531GE "
},{
"value"
:
"1255"
,
"name"
:
"TAD532GE "
}]}
Regards and TIA
Charlie
I have checked my datasournce with JSONLint to make sure its valid.