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

DropDownList using odata and Server-Side paging

1 Answer 592 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Patrick Rioux
Top achievements
Rank 1
Patrick Rioux asked on 20 Feb 2012, 05:04 PM
Hi,

I'm really beginner with the Kendo UI and not sure how to implement this.
I want to use a DropDownList to load 50,000 elements. Loading this amount of option doesn't make sense and not performance wise.
I have successfully used the grid and Server-Side paging and this is working very well for large dataset.
I want to do the same with the DropDownList. When I set the PageSize (20), number or records to load per page is limited to that number (very great).
I thoughts that when searching on different names, the DropDownList contronl would automatically re-fetch to retrieved the new values. How the DropDownList should be used for larger dataset?  Unfortunately all the examples are either on small dataset or using local JavaScript array.

I guess I need to implement something for don't know how to handle this.

Thank you.

<script type="text/javascript">
    $(document).ready(function() {
    
      $("#dropDownList").kendoDropDownList({
            autoBind: false,
            dataTextField: "SalesrepName",
            dataValueField: "SalesrepId",
            dataSource: {
                type: "odata",
                serverFiltering: true,
                serverPaging: true,
                pageSize: 20,
                transport: {
                    read: "csp/mediapool/public/dt.common.odata.RequestServer.cls?$select=SalesrepId,SalesrepName&$tablename=dt_common_ui_samples_data.Salesrep&$orderby=SalesrepName"
                }
            }
        });

});
</script>

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 22 Feb 2012, 03:42 PM
Hello Patrick,

 
I will suggest you check this online demo, which shows how to use DropDownList widget with remote data.
Note that the DropDownList widget does not provide filtering functionality like the ComboBox. One possible solution is to use DataSouce.filter() method and re-fetch the data manually.

Kind regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Patrick Rioux
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or