O'Reilly logo

Learning Kendo UI Web Development by John Adams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Binding AutoComplete to Remote Data

Now that we have seen how to wire up the AutoComplete widget using local JavaScript data, let's see how to do it with remote data. Add a new class called StateTerritory.cs to the Models folder in the Visual Studio project. Structure it to hold the relevant data about states and territories so that we can use this in our page.

namespace LearningKendoUIWeb.Models
{
  public class StateTerritory
  {
    public string Name { get; set; }
    public bool IsState { get; set; }
    public bool IsTerritory { get; set; }
    public bool IsContiguous { get; set; }
  }
}

Now open the SampleRepository.cs class file and add some logic to create a repository of our state and territory data. Note that I have intentionally counted the District of Columbia ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required