Provides a wrapper over the popular typeahead.js library.
You can bind the control to a collection of string
s:
<dc:TypeAhead DataSource="{value: CountryNames}"
SelectedValue="{value: SelectedCountryName}" />
<br />
Selected Value: <span class="result">{{value: SelectedCountryName}}</span>
You can bind the control to a collection of any objects and use the DisplayMember
and ValueMember
properties to specify, which fields should be used as the item text and item value. This approach is similar to the ComboBox control.
<dc:TypeAhead DataSource="{value: Countries}"
SelectedValue="{value: SelectedCountryId}"
DisplayMember="Name"
ValueMember="Id" />
<br />
Selected object ID: <span class="result">{{value: SelectedCountryId}}</span>