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

JSONP

1 Answer 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luke
Top achievements
Rank 1
Luke asked on 19 Aug 2011, 03:49 PM
HI, 

I'm struggling to successfully bind to my JSONP service, the results come back fine, but it is as an array, and from the examples, i can not see how to pull a specific index out. im sure its something to do with the schema, but i cant seem to figure it out. 

my service returns like the following

?(
    {
        "name": "tempLocSearch",
        "columns": [
         
            "UniqueId",
            "Parent",
            "DisplayName",
            "Type",
            "X",
            "Y",
            "Rank",
            "Name",
            "Zoom"],
        "data": [
         
                [
                "010023831054", "17800386", "<b>Pathfinder</b> House, St Marys Street, Huntingdon, PE29 3TN", "Property", "523999", "271531", "22%", "Pathfinder House,  St Marys Street, Huntingdon, PE29 3TN", "100"
                ]
                ,
                [
                "010090390725", "17800386", "Customer Service Centre, <b>Pathfinder</b> House, St Marys Street, Huntingdon, PE29 3TN", "Property", "524029", "271563", "15%", "Customer Service Centre, Pathfinder House,  St Marys Street, Huntingdon, PE29 3TN", "100"
                ]
                 
        ],
        "total": 0       
    }
);


If this is not a standard JSONP, then my other question is, how can i add items explicitly to a control (eg combobox), such as combobox.items.add("Item 1");

many thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 22 Aug 2011, 10:45 AM
Hello Luke,

Currently binding to array of arrays is not straight forward albeit possible. You can check this example for a working demo. We plan to improve this a lot in the future by defining a model and mapping of its fields to array indexes.

Currently there is no API for adding items in a combobox but we will consider implementing it.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Luke
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or