change transport / read / url

3 posts, 0 answers
  1. Wyatt
    Wyatt avatar
    22 posts
    Member since:
    Aug 2012

    Posted 23 Sep 2014 Link to this post

    I am currently using the below to setup my autocomplete.  it works well, however, it seems to bind the url just once, I need it to bind again later so that I can send a different value.
    IE this $("#impRacf").val()  changes, and I need that to reflect in my call.  thanks!

        $("#sellerNameFilter").kendoAutoComplete({
            placeholder: "Enter Seller Name ...",
            dataTextField: "seller_name",
            filter: "searchValue",
            minLength: 3,
            dataSource: {
                type: "json",
                serverFiltering: true,
                serverPaging: true,
                pageSize: 20,
                transport: {
                    read:
                        {
                            url: publish + "/home/sellerName?&id=" + $("#impRacf").val()
                        }, //read
                    parameterMap: function () {// send value of autocomplete as the "startsWith" parameter
                        return {
                            searchValue: $("#sellerNameFilter").data("kendoAutoComplete").value()
                        };
                    }
                } //transport
            } //datasource
        }); //kendoAutoComplete
  2. Holger
    Holger avatar
    77 posts
    Member since:
    Nov 2012

    Posted 24 Sep 2014 in reply to Wyatt Link to this post

    Hello Wyatt,

    According to the documentation you can use a function instead of a URL. Please refer to the sample provided with the documentation.

    Regards,
    Holger
  3. Kendo UI is VS 2017 Ready
  4. Holger
    Holger avatar
    77 posts
    Member since:
    Nov 2012

    Posted 24 Sep 2014 in reply to Holger Link to this post

    The link to the documentation is not functional, so here is it again: http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-transport.read
Back to Top