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

DataForm List<T> member

3 Answers 40 Views
DataForm - Xamarin.Android
This is a migrated thread and some comments may be shown as answers.
Vaggelis
Top achievements
Rank 1
Vaggelis asked on 06 Apr 2016, 09:19 AM

Greetings,

I would like to know if it is possible to have a LIST<T> property as a member of the DataForm Entity.

Thank you for your time,

vagg

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 11 Apr 2016, 08:08 AM
Hi Vangelis,

Thank you for your interest in DataForm for Xamarin.Android.

I am not sure I understand correctly your idea. You can have a property of type T, then you can supply the editor of the property with an adapter with all possible values - your list. This way the editor will allow users choose a value for the list, however at a point only one value will be selected and this is why the property's type is T. If this is not your idea, please elaborate a bit more on your scenario.

Regards,
Todor
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
0
Vaggelis
Top achievements
Rank 1
answered on 12 Apr 2016, 06:21 AM

Hello Todor and thank you for your reply,

Allow me to elaborate on my query a bit. I have a class as a DataForm Entity, let's say class Patient. This class has the usual and expected properties such as name, surname, etc

One of its properties however is a list, say a List<string> for simplicity's sake, or even string[], I can go either way if that would help. How am I going to display this list using the DataForm?

Please, keep in mind, displaying the DataForm and then adding an Android ListView on the layout is something I would really like to avoid, since the data should be within the DataForm, in-between other displayed properties.

However, I am not interested in editing these data with a DataForm editor, I can do this by starting a new activity for a selected list item and edit it there.

Thank you for your time

Vaggelis

0
Todor
Telerik team
answered on 15 Apr 2016, 07:54 AM
Hi Vaggelis,

Neither Arrays, nor Lists are supported by the current implementation of DataForm for Android. What you can do is have a property of type string whose value you know how to interpret. For example, the list values, separated by commas ("one, two, three, six"). You can also flag that property as ReadOnly, so that it is not edited as a simple text.

I hope this information helps.

Regards,
Todor
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
Tags
DataForm - Xamarin.Android
Asked by
Vaggelis
Top achievements
Rank 1
Answers by
Todor
Telerik team
Vaggelis
Top achievements
Rank 1
Share this question
or