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

Custom Editor With Multiline TextBox

5 Answers 237 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alessio Bulleri
Top achievements
Rank 1
Alessio Bulleri asked on 26 Jan 2017, 12:29 PM

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 ?

 

5 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Jan 2017, 09:54 AM
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.
0
Alessio Bulleri
Top achievements
Rank 1
answered on 30 Jan 2017, 03:13 PM

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

0
Alessio Bulleri
Top achievements
Rank 1
answered on 30 Jan 2017, 03:15 PM
Sorry, I miss the attachment in the previous message, here it is.
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Feb 2017, 09:42 AM
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.
0
Alessio Bulleri
Top achievements
Rank 1
answered on 06 Feb 2017, 04:07 PM
Thanks a lot for your help !
Tags
GridView
Asked by
Alessio Bulleri
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Alessio Bulleri
Top achievements
Rank 1
Share this question
or