Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8109815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:32:16+00:00 2026-06-06T01:32:16+00:00

I have a MVC3 ASP.NET Project in which I am using jQuery and KendoUI

  • 0

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.

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…

Can anyone help?

Bellow is a snippet of my code:

<input id="kendoCboClienti" />

<script type="text/javascript">
    $(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
        });
    });
</script>

And the JSON string look similar to this:

[  
    {ID:429,RAGIONE_SOCIALE:"AUTOTRASP.PORETTO G."},
    {ID:430,RAGIONE_SOCIALE:"P.G. JOHNNY IMPORT EXPORT"},
    {ID:431,RAGIONE_SOCIALE:"CONFARTIGIANATO TREVISO"},
    .....    
]

In jsFiddle works, but it is very very slow, unresponsive and the browser crashes sometimes for that amount of data.

Thanks!

Edit 1: 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:32:18+00:00Added an answer on June 6, 2026 at 1:32 am

    Yep, the problem was with the JSON format I was sending from the controller. I am using a 3rd party web service (based on ServiceStack). In the controller I was ‘reading’ the web response in a string (which was a JSON string), and pass it further. The problem was that the JSON string returned was between ” “, and somehow the dataSource cannot handle it.

    So, my solution was based on your example above: I created a model, a collection and I returned the collection.

    Result: everything worked perfect. The JSON returned was no longer between ” ” and the dataSource object was initialized properly.

    Here is the code:

    ClientiController.cs

    public class ClientiController : Controller
    {            
            public JsonResult Index()
            {
                StreamReader sr = null;
                string json = string.Empty;
    
                try
                {
                    WebRequest request = WebRequest.Create("urlGoesHere");
    
                    using (WebResponse response = request.GetResponse())
                    {
                        sr = new StreamReader(response.GetResponseStream(), true);
                        json = sr.ReadToEnd();
                    }
                }
                catch { return Json("", JsonRequestBehavior.AllowGet); }
    
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                ClientiCollection collection = serializer.Deserialize<ClientiCollection>(json);
    
                return Json(collection, JsonRequestBehavior.AllowGet);
            }
    
    }
    

    Client.cs

    public class Client
    {
            public string ID { get; set; }
            public string RAGIONE_SOCIALE { get; set; }
    }
    

    ClientiCollection.cs

    public class ClientiCollection
    {
            public IEnumerable<Client> ClientiList { get; set; }
    }
    

    HTML

    <input id="kendoCboClienti" />
    
    <script type="text/javascript">
        $(document).ready(function () {
            var clientiDataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "/Clienti/",
                        dataType: "json"
                    }
                },
                schema: {
                    data: "ClientiList"
                }
            });
    
            $("#kendoCboClienti").kendoComboBox({
                dataTextField: "RAGIONE_SOCIALE",
                dataValueField: "ID",
                dataSource: clientiDataSource,
            });
        });
    </script>
    

    However, I have ~8000 records to be displayed and the combobox it’s a bit slow (~1.5 sec on opening). I’m not sure if I could somehow improve the response of it, without modifying the server in any way.

    P.S. Thanks a lot, Igorrious!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom ValidationAttribute in my ASP.NET MVC3 project which has two conditions
I`m using mustache.js on client and Nustache in ASP.NET MVC3 project. I have Person.mustache
I am working on a project which adopted ASP.NET MVC3(Razor) tech. Now, I have
In an ASP.NET MVC3 project I have a structure like this: Core.csproj -> 3rdparty1.dll
In a ASP.NET MVC3 Razor project I have 2 Models public class Post {
i have a problem with the asp.net MVC3. when i create a new project
I'm creating a project from the book Sanderson Pro ASp.net mvc3. But I have
I have an asp.net mvc3 project, it has some reports in aspx web pages.
I have an ASP.NET MVC3 project that uses a tab strip on certain pages.
At the moment I have a MasterPage in an ASP.NET MVC3 project with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.