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