DropDownList using odata and Server-Side paging

2 posts, 0 answers
  1. Patrick Rioux
    Patrick Rioux avatar
    53 posts
    Member since:
    Sep 2012

    Posted 20 Feb 2012 Link to this post

    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>
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 22 Feb 2012 Link to this post

    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!
Back to Top