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

DataSource is not reaching JSONRequest

3 Answers 94 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
axwack
Top achievements
Rank 1
axwack asked on 10 Jul 2012, 08:10 PM
I have a very peculiar problem. One of my client requests goes to the HomeController and successfully gets the data. The second never gets reached

$("#ResidualRec") 

What could be wrong? 


$("#Accounts").kendoComboBox({
               dataTextField: "AcctName",
               dataValueField: "AcctCd",
               dataSource: {
                   transport: {
                       read: "/Home/GetAccounts"
                   }
               },
               template: $("#scriptTemplate").html(),
               filter: "startswith"
           });
 
           var combobox = $("#Accounts").data("kendoComboBox");
           // set width of the drop-down list
           combobox.list.width(400);
 
           var sharableDataSource = new kendo.data.DataSource({
               transport: {
                   read: {
                       url: "@Url.Action("GetSecurities","Home")",
                       dataType: "json"   
                   },
                   type:"POST"
               }
           });
 
           $("#ResidualRec").kendoComboBox({
               datasource:sharableDataSource,
               filter: "startswith"
           });
This is the webpage value.
<select id="ResidualSec"  data-value-field="Cusip" data-text-field="SecName" data-role="combobox" placeholder="Enter Residual" data-bind="value: Residual"></select>                   
            <select id="UnderlyingSec" data-role="combobox" data-value-field="SecName" data-text-field="Cusip" placeholder="Enter Underlying" data-bind="value: Underlying"></select>
            <select id="FloaterSec" data-role="combobox" data-text-field="SecName" data-value-field="CUSIP" placeholder="Enter Floater" data-bind="value: Floater"></select>

The one that works is as follows: 
<div id="allocation">
    <div class="selector">         
   <select id="Accounts" style="width: 225px" data-role="combobox" data-value-field="AcctCd" data-text-field="AcctName"
                data-bind="value: AcctCd" placeholder="Select Funds..."></select>

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 11 Jul 2012, 07:00 AM
Hello Vincent,

The code snippets look OK, but I am afraid they are not enough to detect where the reason for the problem is. Could you please provide a sample project that I can test locally? Thus way I would be able to investigate your case in details and do my best to provide you with an accurate solution. Thank you in advance. 

Greetings,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
axwack
Top achievements
Rank 1
answered on 14 Jul 2012, 11:27 PM
I think the reason is that I am bringing back 55,9k objects as I've tried to use this with a lesser return set.

However, there is no way to know what Telerik complains about. How can you debug something like this?
0
Iliana Dyankova
Telerik team
answered on 18 Jul 2012, 04:08 PM
Hello Vincent,

The most likely reason for the issue is the huge number of objects that are returned. I would suggest to try to enable serverPaging in order to reduce the number of returned rows. Also, you could try to use an AJAX request and observe the behavior in this case.

I hope this helps.
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
axwack
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
axwack
Top achievements
Rank 1
Share this question
or