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

Autocomplete missing code

1 Answer 55 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Bruce
Top achievements
Rank 1
Bruce asked on 05 Jul 2019, 07:47 AM

The code showing how to return json to the client is missing in the autocomplete examples

using Microsoft.AspNetCore.Mvc;


namespace Kendo.Mvc.Examples.Controllers
{
    public partial class AutoCompleteController : Controller
    {
        [Demo]
        public IActionResult ClientFiltering()
        {
            return View();
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 09 Jul 2019, 03:54 PM
Hello Bruce,
Thank you for your feedback about our documentation. We are constantly working on improving our product and customers’ experience and your voice will be escalated to the responsible people and department. 

Attached to this reply, you will find a runnable project demonstrating a client filtering using an AutoComplete component. Here is the definition of the controller which populates the data in the AutoComplete:
public JsonResult GetProducts() {
    var productsList = new List<Product>();
 
    productsList.Add(new Product() { ProductName = "Aniseed Syrup" });
    productsList.Add(new Product() { ProductName = "Chai" });
    productsList.Add(new Product() { ProductName = "Chang" });
    productsList.Add(new Product() { ProductName = "Tofu" });
    productsList.Add(new Product() { ProductName = "ThĂĽringer Rostbratwurstt" });
    productsList.Add(new Product() { ProductName = "Tarte au sucre" });
    productsList.Add(new Product() { ProductName = "Mascarpone Fabiolif" });
    productsList.Add(new Product() { ProductName = "Grandma's Boysenberry Spread" });
    productsList.Add(new Product() { ProductName = "Uncle Bob's Organic Dried Pears" });
 
    return Json(productsList);
}

Please, check the provided project and let me know if you have any questions regarding the implementation. 

Regards,
Petar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
AutoComplete
Asked by
Bruce
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or