Event handling and multiline text editors

2 posts, 0 answers
  1. Vaggelis
    Vaggelis avatar
    4 posts
    Member since:
    Apr 2016

    Posted 13 Apr Link to this post


    I have a few more questions about the DataForm editors.

    1)I am interested in starting a new activity when the user tries to edit a certain property. Should I implement some kind of event, or create a new editor that overrides a certain method (and which)?

    2)I would like to know if and how I could setup a multiline text editor.

    Thank you in advance,


  2. Todor
    Todor avatar
    773 posts

    Posted 18 Apr Link to this post

    Hi Vaggelis,

    Thank you for your questions.

    1) If you want to use a new activity to edit a property, you can flag that property to be readonly so that the user can edit it using an editor and add an OnClickListener that you can use to make the navigation:

    public class MyClickListener : Java.Lang.Object, View.IOnClickListener {
        public void OnClick (View v)
            // Navigate to where you should.
    EntityPropertyViewer propertyViewer = (EntityPropertyViewer)dataForm.GetExistingEditorForProperty("Age");
    propertyViewer.EditorView.SetOnClickListener (new MyClickListener ());

    2) Here's how to make the editor's EditText support multi lines:

    DataFormTextEditor textEditor = (DataFormTextEditor)dataForm.GetExistingEditorForProperty("Name");
    ((EditText)textEditor.EditorView).SetSingleLine (false);

    I hope this information helps.

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