Note that there are some explanatory texts on larger screens.

plurals
  1. POPopulating a Kendo UI Combobox with big JSON string
    text
    copied!<p>I have a MVC3 ASP.NET Project in which I am using jQuery and KendoUI for the view. I have defined the combobox, a dataSource for it and I am getting results from the controller with the JSON string in correct format within the dataSource.</p> <p>The data returned as JSON string is about 500kb and the combobox is not showing anything. It just shows the loading icon in the right side of it. I think the large amount of data really is a problem here...</p> <p>Can anyone help?</p> <p>Bellow is a snippet of my code:</p> <p><code>&lt;input id="kendoCboClienti" /&gt;</code></p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { clientiDS = new kendo.data.DataSource({ transport: { read: { url: "/Clienti/", dataType: "json" } }, schema: { model: { fields: { id: { type: "string" }, ragioneSociale: { type: "string" } } } } }); $("#kendoCboClienti").kendoComboBox({ placeholder: "Sceglie il cliente", dataTextField: "RAGIONE_SOCIALE", dataValueField: "ID", dataSource: clientiDS }); }); &lt;/script&gt; </code></pre> <p>And the JSON string look similar to this:</p> <pre><code>[ {ID:429,RAGIONE_SOCIALE:"AUTOTRASP.PORETTO G."}, {ID:430,RAGIONE_SOCIALE:"P.G. JOHNNY IMPORT EXPORT"}, {ID:431,RAGIONE_SOCIALE:"CONFARTIGIANATO TREVISO"}, ..... ] </code></pre> <p>In jsFiddle works, but it is very very slow, unresponsive and the browser crashes sometimes for that amount of data.</p> <p>Thanks!</p> <p><strong>Edit 1:</strong> I've modified the amount of data sent to the dataSource (only 10 records) and still doesn't work. Maybe it's a problem with the dataSource?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload