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

how to use RadDataForm?

4 Answers 147 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Xiaoming
Top achievements
Rank 1
Xiaoming asked on 11 Jul 2015, 07:32 AM
Introduction has nothing about dataform,how to use RadDataForm?

4 Answers, 1 is accepted

Sort by
0
Xiaoming
Top achievements
Rank 1
answered on 11 Jul 2015, 10:42 PM
I'm sorry but I checked the example and there are no related example about the new data form controls, any ideas?
0
Accepted
Victor
Telerik team
answered on 16 Jul 2015, 07:18 AM
Hi Xiaoming,

Thanks for writing.
Please note that RadDataForm is still in a beta state and some features are not yet enabled/complete.

Here is the simplest way to use RadDataForm:
RadDataForm form = new RadDataForm(context);
form.setEntity(new Person());
 
form.setCommitMode(CommitMode.MANUAL);
 
layoutRoot.addView(form);

Create a data form object, set an entity for edit, specify commit mode (optional) and add the form to the android layout.

The online help for the data form is ready and will uploaded shortly.

Regards,
Victor
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
Jimmy
Top achievements
Rank 1
answered on 29 Sep 2015, 07:58 AM

Hi Victor,

   I tried one simple example on RadDataForm like below

  
                RadDataForm dataForm = new RadDataForm(this);
                dataForm.Entity = new ​Product();
    It is throwing an error stating "Error5Cannot implicitly convert type 'TelerikListView.​Product' to 'Com.Telerik.Widget.Dataform.Engine.IEntity'. An explicit conversion exists (are you missing a cast?)

 

After that i tried this

dataForm.Entity = (Com.Telerik.Widget.Dataform.Engine.IEntity)new Product();

it is throwing an exception

"Cannot cast from source type to destination type."

please rectify this.

And also i downloaded UI for Xamarin and i added an samples solution which was given by telerik to my solution explorer and i executed it is throwing an error

Error2The type or namespace name 'EntityProperty' could not be found (are you missing a using directive or an assembly reference?)C:\Program Files (x86)\Telerik\UI for Xamarin Q2 2015\Examples\Android\Fragments\DataForm\CustomEditor.cs1746Samples

  ​


0
Victor
Telerik team
answered on 01 Oct 2015, 07:31 AM
Hello Sylendra,

Thank you for writing.
Currently there is a problem with the Xamarin wrappers for RadDataForm. Since RadDataForm uses the Java reflection to generate its editors for the provided object, it fails to render under Xamarin because the Java reflection does not work there. There are two classes that need to be rewritten to use the C# reflection instead and we have plans to provide those for the Q3 2015 Service Pack release. The service pack is scheduled for next month.

Meanwhile if you have questions about the native RadDataForm for Android, we're ready to assist you.

Regards,
Victor
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
Asked by
Xiaoming
Top achievements
Rank 1
Answers by
Xiaoming
Top achievements
Rank 1
Victor
Telerik team
Jimmy
Top achievements
Rank 1
Share this question
or