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

How to create a custom editor

5 Answers 149 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Greg Lavelle
Top achievements
Rank 1
Greg Lavelle asked on 08 May 2017, 03:59 PM

Hello,

All is in the title.
I could not find any documentation nor example for that feature, besides that I need to create a custom renderer and register it.
Can you provide an example of an editor that triggers an action when clicked, by example?

Regards,

Gregs

5 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 11 May 2017, 08:45 AM
Hello Greg,

In our latest version we have implemented an example for RadDataForm in our Progress Telerik UI for Xamarin Samples app where make some adjustments to the default editors. Specifically for Android you can see how it should be implemented(provide custom layouts through xml files). In UWP, you should create an editor which implements the ITypeEditor interface, while in iOS your editor should implement TKDataFormEditor.

Please, let me know if anything unexpected arises.

Regards,
Ivaylo Gergov
Telerik by Progress
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
Rodrigo
Top achievements
Rank 1
Veteran
answered on 07 Sep 2020, 10:00 PM

Hi,

I'm trying to implement custom form editor using iOS TKDataFormEditor. If I assign my Custom Class for the Form Editor - editor gets completely ignored and none of the delegate methods (SetupEditor, UpdateEditor) gets called for that edit.

Can you please provide very basic sample(s) for iOS and Android?

0
Yana
Telerik team
answered on 10 Sep 2020, 03:12 PM

Hello Rodrigo,

We have initial documentation here, but I also recommend taking a look at the custom editor examples in our Demos Applications, so you can get a full picture of the infrastructure.

SDK Browser Examples:
The CustomAutoCompleteEditor example uses a custom editor. on Android. Be sure to visit the native project's renderer for the actual editor implementation.

QSF Examples:
The Reservations Example also uses a custom editor for the name field. Again, look at the native project's renderers for the actual implementation. Here's the iOS custom data form renderer.

I hope this will help you get started. If you have any concrete questions, let me know.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Rodrigo
Top achievements
Rank 1
Veteran
answered on 15 Sep 2020, 08:05 PM

Hi Yana,

 

thank you for the samples provided. Unfortunately, all of them arte Xamarin Forms. I'm looking for the sample for "native" Xamarin.Android or Xamarin.iOS. 

 

Regards,

Rodrigo

0
Lance | Senior Manager Technical Support
Telerik team
answered on 15 Sep 2020, 08:52 PM

Hello Rodrigo,

All examples of custom editors have native implementations by default. This is because a Xamarin.Forms RadDataForm editor is a native implementation, there are no Xamarin.Forms editors. The RadDataForm abstracts the native editor, thus for a custom editor, you must implement a custom editor in the Xamarin.iOS and Xamarin.Android project.

Where To Look

The Xamarin.Forms demos use a Xamarin.iOS and Xamarin.Android project, this is where you will find the custom editor code. If you're not sure where to look, go upwards in the source code repositories until you see the Xamain.iOS and Xamarin.Android projects.

For your convenience, here are the links to the Solution folders.

Now that you're in the Solution level,  you can drill down into the respective native projects. Again, for your convenience, I will provide the links:

    Important Note

    Keep in mind that Telerik UI for Xamarin is highly focused on the Xamarin.Forms layer, not all features you see advertised in Xamarin.Forms will be available in the native platform. You may also find there is not the same feature parity between native wrappers if that functionality is implemented in the Xamarin.Forms layer.

    Technical Assistance

    If you would like one-on-one assistance to get more information about what properties to use to achieve your goals, please open a Technical Support Ticket here. Custom app development is not covered, but we will do the most we can to make sure you have all the information you need to achieve your goals.

    Native Wrappers Only Demos

    That is the extent of the official demos. If you would like to review only Droid and iOS wrappers, please follow the instructions here. Note, they do not have the same level of customization as the examples I shared above. 

    For your convenience, here are the locations on your disk

    • C:\Program Files (x86)\Progress\Telerik UI for Xamarin [VERSION]\Examples\Android
    • C:\Program Files (x86)\Progress\Telerik UI for Xamarin [VERSION]\Examples\iOS

    For more information, visit the native wrapper documentation https://docs.telerik.com/devtools/xamarin/nativecontrols/android/dataform/dataform-custom-editors

    Regards,
    Lance | Manager Technical Support
    Progress Telerik

    Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

    Tags
    DataForm
    Asked by
    Greg Lavelle
    Top achievements
    Rank 1
    Answers by
    Ivaylo Gergov
    Telerik team
    Rodrigo
    Top achievements
    Rank 1
    Veteran
    Yana
    Telerik team
    Lance | Senior Manager Technical Support
    Telerik team
    Share this question
    or