how to use RadDataForm?

5 posts, 1 answers
  1. Xiaoming
    Xiaoming avatar
    9 posts
    Member since:
    Oct 2011

    Posted 11 Jul 2015 Link to this post

    Introduction has nothing about dataform,how to use RadDataForm?
  2. Xiaoming
    Xiaoming avatar
    9 posts
    Member since:
    Oct 2011

    Posted 11 Jul 2015 in reply to Xiaoming Link to this post

    I'm sorry but I checked the example and there are no related example about the new data form controls, any ideas?
  3. DevCraft banner
  4. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 16 Jul 2015 Link to this post

    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
  5. sylendra
    sylendra avatar
    1 posts
    Member since:
    Sep 2015

    Posted 29 Sep 2015 Link to this post

    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

      ​


  6. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 01 Oct 2015 Link to this post

    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
Back to Top
DevCraft banner