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

kendoDropDownList only 10 records are bind in dropdown

1 Answer 285 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Lokesh
Top achievements
Rank 1
Lokesh asked on 10 Jul 2017, 06:55 AM

Hi,

I have created a kendo-drop-down-list in angularjs. I called a web service for records. Suppose i got around 15 array object as in the response but kendo drop down list bind only 10 records. If i search from the filter then i can see respective data. but not visible all records in drop down list.

Please have a look with code as well. Let me know what is the issue.

<select id="CARRIER_NAME" class="form-control" kendo-drop-down-list k-options="carrierOptions" name="carrierName" ng-model="test.carrierName"></select>

 <script id="noDataTemplate" class="noDataTemplate" type="text/x-kendo-tmpl">
        <div> No data found. Do you want to add new item - '#: instance.filterInput.val() #' ? {{someAngularFunction()}}
      </div>
        <br />
        <button class="k-button add-new-item-btn" ng-click="addNew('#: instance.element[0].id #', '#: instance.filterInput.val() #')">Add new item</button>
    </script>

 

CallWebServiceFactory.getDropDownData(reqData).then(function Success(response) {
        if(response.isSuccess){
            $scope.carrierData = response.data;
             $scope.carrierOptions = {
             filter: "startswith",
              dataSource: $scope.carrierData,
              dataTextField: "name",
              dataValueField: "id",
              noDataTemplate: $(".noDataTemplate").html(),
              index: -1
        }; 
        }
     }, function(error) {
      console.log(error);
     });

Thanks,

Lokesh Pareek

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 12 Jul 2017, 06:02 AM

Hello Lokesh,

 

I created a sample that follows similar situation with Kendo DropDownList, but all items are bound properly. Here you are the dojo example to test it out: http://dojo.telerik.com/aMapa. And this is the JSON response used: http://myjson.com/1cjdin

 

Regards,
Ianko
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Lokesh
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or