Kendo Autocomplete Angular JS dynamic URL

1 posts, 0 answers
  1. Ismail
    Ismail avatar
    2 posts
    Member since:
    Jul 2016

    Posted 06 Sep Link to this post



    Hope someone can help me with the following 


    I am currently using Kendo autocomplete in a textbox.

    I require the following

    -when the user types values into the textbox the values which have been typed need to be passed to the controller in my MVC application, the controller in my application has a parameter called supplierName

    so when making calling the service the url needs to read as localhost/Supplier/GetSupplier?supplierName=abc


    this is the code i currently have 
    in my aspx page

    <input type="text" kendo-autocomplete k-data-source="DataSource" k-data-text-field="'supplierName'"
                                   k-data-value-field="'SupplierId'" ng-model="SearchData.supplierName" k-min-length="3" style="width: 100%" />

    and this is the code i have in my JS file

    $scope.DataSource = new{
           transport: {
               serverFiltering: true,
               read: {
                   url: "/Supplier/GetSupplier",
                   dataType: "json"
           schema: {
               type: "json",
               data: "SupplierNames",
               model: {
                   fields: {
                       fields: {
                           Field1: { field: "Field1", type: "string" },
                           Field2: { field: "Field2", type: "number" }


    how would it be possible for me to achieve what is required?

Back to Top