How to create a custom editor

6 posts, 0 answers
  1. Greg Lavelle
    Greg Lavelle avatar
    6 posts
    Member since:
    Oct 2006

    Posted 08 May 2017 Link to this post

    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

  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    691 posts

    Posted 11 May 2017 Link to this post

    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
  3. Rodrigo
    Rodrigo avatar
    13 posts
    Member since:
    May 2018

    Posted 07 Sep in reply to Ivaylo Gergov Link to this post

    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?

  4. Yana
    Admin
    Yana avatar
    5002 posts

    Posted 10 Sep Link to this post

    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/.

  5. Rodrigo
    Rodrigo avatar
    13 posts
    Member since:
    May 2018

    Posted 15 Sep in reply to Yana Link to this post

    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

  6. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1159 posts

    Posted 15 Sep Link to this post

    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).

    Back to Top