RadDataForm: Built-in Editors

The RadDataForm contains many built-in property editors that are either automatically resolved depending on the property's type or by the dataSource editorClass of the TKDataForm. The RadDataForm currently ships with the following built-in editors:

Using the 'TKDataFormAutocompleteController'

The TKDataFormAutocompleteController is a bit more advanced editor which provides an out of the box quick search functionality. This editor uses the TKAutoCompleteTextView stand alone element and all its functionality like DisplayMode is available to the RadDataForm editor.

In order to set a specific editor to a property of your data source all that you need is set the editorClass of that element in the TKDataFormEntityDataSource

Setting the suggestions 'source'

Because of the nature of the RadAutoCompleteTextView the editor which exposes its functionality requires some additional data to be passed to it which will be used as the 'suggestions' when a user starts typing in its text box.

Passing this data can be done in multiple different approaches depending on which one is the easiest for your scenario:

Setting the DisplayMode

If you are familiar with the TKAutoCompleteTextView element you know that is supports out of the box two different selected items display modes:

When using the DataFormRadAutoCompleteEditor you too have the option to change the editor's displayMode by simply setting the autoCompleteDisplayMode of the specific element in the TKDataFormEntityDataSource.

The full Objective-C source code of the above example can be found here.