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

How to Programatically create RadEditor with No Menus

1 Answer 77 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Anthony asked on 04 Nov 2010, 11:03 AM

I am filling a listbox based on the values selected in a tree view, the list box items need to be a RadEditor, i have this working but sometimes when the list box items are created and added the RadEditor Menu items are displayed aswell (this does not happen all the time).  I dont want the menu items to display as i only want to show the content as though it was a textbox with no editing functionality. Can i set the Menu Property at the point of creating the content item to ensure that the menu does not show.

My Code that creates the ListBox Item and Editor Content is as follows :
For Each node In RadTreeViewTCs.GetAllNodes
                    If node.Checked = True Then
                       'Do Some Stuff Here
                    ElseIf node.Checked = False Then
                        Dim Value As New RadListBoxItem
                        Dim Content As New RadEditor
                        Content.Content = node.Text.ToString
                        Content.Width = "150"
                        Content.Height = "75"
                    End If
                Next node

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 08 Nov 2010, 04:57 PM
Hi Anthony,

You can achieve the required result by assigning an XML file containing only <root> node to the RadEditor's ToolsFile property, e.g.:
Content.ToolsFile = "~/NoToolsToolsFile.xml"
NoToolsToolsFile.xml content:
<?xml version="1.0" encoding="utf-8" ?>

Please let us know if this helps.

Best wishes,
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question