Custom Editor With Multiline TextBox

6 posts, 1 answers
  1. Alessio Bulleri
    Alessio Bulleri avatar
    34 posts
    Member since:
    Sep 2008

    Posted 26 Jan 2017 Link to this post

    Hi,

    I've written a Custom Editor with a TextBox and two buttons (I simply made few changes at the code of your CustomEditor Demo), it seem to work fine except for the fact that if I set the Multiline propery of the TextBoxItem to true I cannot change the text anymore (I looks like it became ReadOnly), so I suppose it isn't so simple.

    How can I write a custom editor that accept multiline text ?

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4077 posts

    Posted 27 Jan 2017 Link to this post

    Hello Alessio,

    Thank you for writing.  

    I am not sure what is the exact custom implementation that you have. However, I have prepared a sample project that adds 3 button elements to the text box editor. When multiline is enabled, you can type in the editor. Am I missing something? Could you please specify the exact steps how to reproduce the problem or get back to me with a sample project so I can investigate the precise case?

    I am looking forward to your reply.

     Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Alessio Bulleri
    Alessio Bulleri avatar
    34 posts
    Member since:
    Sep 2008

    Posted 30 Jan 2017 Link to this post

    Hello Dess,

    thank you for your answer.

    I've attached a sample project with my custom editor (it is intended as a base class for more specilized editors and have a variable number of buttons).

    As you can see in the EditorRequired event, the multiline flag for the editor in column1 is set to false and everything works fine, while the editor in column2 have multiline set to true and you can't edit the value.

    I have one more question, as you can see from my code I've used a trick to defer the execution of the CreateChildElements() until the end of the class contructor (so I know how many buttons I need). Obviously I don't like my solution very much, so I'd like to know if there's a better way to do that.

    Thank you very much

    Best Regards

    Alessio

    P.S.: I can attach only images so to send you the sample project I've changed the attachment extension from zip to jpg

  4. Alessio Bulleri
    Alessio Bulleri avatar
    34 posts
    Member since:
    Sep 2008

    Posted 30 Jan 2017 in reply to Alessio Bulleri Link to this post

    Sorry, I miss the attachment in the previous message, here it is.
  5. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4077 posts

    Posted 01 Feb 2017 Link to this post

    Hello Alessio, 

    Thank you for writing back. 

    I have attached the modified sample project in order to use RadTextBoxElement in the custom editor. Now, the second column works as expected with enabled multiline. 

    I hope this information helps. If you have any additional questions, please let me know. 

     Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Alessio Bulleri
    Alessio Bulleri avatar
    34 posts
    Member since:
    Sep 2008

    Posted 06 Feb 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks a lot for your help !
Back to Top