This is a migrated thread and some comments may be shown as answers.

Problems Binding CallBack Json Data

1 Answer 123 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Nicole
Top achievements
Rank 1
Nicole asked on 26 Nov 2012, 07:00 PM
Hi,

I'm attempting to create the kendoComboBox on the client side with data passed into a callback javascript method. The control is created, but there seems to be a problem with the databinding. When the page renders, I see the combobox placeholder value, BUT when I click the down arrow, or try to type in the field for autocomplete/filtering nothing happens.

For example I have data coming back from my ajax call like

{"bloomberg": [
        {"id": "1", "account": "my institution bank", "ticker": "BOND_TO_EQY_TICKER"},     

 ]
},
{
"intex": [
        {"id": "1", "type": "RMBS", "category": "CashFlows"},              {"id": "2", "type": "ABS", "category": "CashFlows"} ]
}

initializecontrols = function (data) {
try
        {
            $("#tpgInput").kendoComboBox({                
                dataSource: {
                    data: data.bloomberg,
                    type: "json"
                },
                select: onComboBoxSelect,
                dataTextField: "account",
                dataValueField: "id",
                placeholder: "Select Bloomberg Account ...",
                // define custom template
                template: '<dl>' +
                              '<dd><strong>Account Name:</strong> ${ data.account }</dd>' +
                              '<dd><strong>Ticker:</strong> ${data.ticker} ' +
                          '</dl>',
                animation: {
                    open: {
                        effects: "fadeIn",
                        duration: 300
                        show: true
                    }
                }
            });
        }
        catch (err) {
            alert(err.message);
        }

When i step through the code I see the data. I'm hoping you can give me some insight into 
what I might be doing wrong.

1 Answer, 1 is accepted

Sort by
0
Nicole
Top achievements
Rank 1
answered on 26 Nov 2012, 09:27 PM
I was missing a reference to jquery.min.js .. I thought my references to jquery-1.8.2.min.js would be sufficient. obviously that's not the case.

*shrugging shoulders*
Tags
ComboBox
Asked by
Nicole
Top achievements
Rank 1
Answers by
Nicole
Top achievements
Rank 1
Share this question
or