This is a migrated thread and some comments may be shown as answers.
AutoCompleteEditor & Custom class
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
Jernej
Top achievements
Rank 1
Jernej asked on 04 Dec 2017, 10:48 AM

Hy,

is any way, for DataForm and EditorType.AutoCompleteEditor, that AutoCompleteEditor has list of custom class and not list of string?


Example:

I have classes for Book and Worker, I would like to use for author AutoComplete whick have list of WorkerRecord.

public class BookRecord{

    [DataSourceKey("BookName")]
    string Name;

    [DataSourceKey("Author")]
    WorkerRecord author;
}

public class WorkerRecord{
    string Name;
    string Surname;
}

 

this.dataForm.RegisterEditor("BookName", EditorType.TextEditor);
this.dataForm.RegisterEditor("Author", EditorType.AutoCompleteEditor);

 

Tnx for all information.

Regards,
Jernej

 

 

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 04 Dec 2017, 04:23 PM
Hi Jernej,

You'll find two examples for such use cases on your PC, located where you installed UI for Xamarin. If you used the default installation location, you'll find the solution here:

C:\Program Files (x86)\Progress\Telerik UI for Xamarin R3 2017\Examples\XamarinForms\SDKBrowser.sln

Once you open the solution in Visual Studio, drill down to the Portable > Examples > DataForm > Editors folder and you'll find the examples. Here, you'll see how to use the PropertyDataSourceProvider and DataSourceKeyAttribute.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Jernej
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or