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

General question on the editor.

3 Answers 64 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Vithiya
Top achievements
Rank 1
Vithiya asked on 08 Jan 2009, 07:07 PM
I need a text control that can display one value and store another value behind it. For example, I want to display  Aeronautics1234.Name in the editor control while the actual value of the text is A1234.Name. Since the A1234 is not user friendly, I want to be able to display a more meaningful word (Aeronautics1234) to the user while saving the original value(A1234) in the database as it is. Is it possible to do that with the radeditor, if yes, can you please provide me with an example?

Thank you,
Vithiya

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Jan 2009, 02:11 PM
Hi Vithiya,

You can replace the Aeronautics1234 string on the server with A1234 using the String.Replace server method:

string text = RadEditor1.Content.Replace("Aeronautics1234", "A1234");

Once you do the conversion, you can save the modified content (string text) to your database.

All the best,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Vithiya
Top achievements
Rank 1
answered on 12 Jan 2009, 02:33 PM
Hi Rumen,

Thank you for the response. The text is being pasted to the editor from another window. The user selects a value in a popup window and clicks a button that closes the popup and pastes the selected text into the editor in the parent window. I want to be able to pass the editor both the values Aeronautics1234 & A1234. i.e. pasting Aeronautics1234 in the editor for the user's view while storing A1234 in the background. I am wondering if the editor has any other properties where I can store extra information. I hope I am clear in explaining what I need to do.

Thank you,
Vithiya
0
Rumen
Telerik team
answered on 15 Jan 2009, 03:18 PM
Hi Vithiya,

RadEditor does not offer the required property for storing extra information. I am not quite sure what your specific scenario is but you can try to set the second value of A1234 to a hidden field and obtain it on the server.

RadEditor is very similar to an enhanced TextBox control and if you are able to implement your scenario with a textbox control you will be able to do it with RadEditor too.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Vithiya
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Vithiya
Top achievements
Rank 1
Share this question
or