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

Get value of Rad Editor inside User Control

1 Answer 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Suzan
Top achievements
Rank 1
Suzan asked on 15 Aug 2017, 02:23 PM

I am trying to get the value of a Radeditor field in a User Control when updating to store it in my database table

In the update command of my grid I have tried using both of these commands

 

Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)

Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)

 

Dim editorcomment As RadEditor
editorcomment = CType(MyUserControl.FindControl("Comment"), RadEditor)
editorcomment = editedItem.FindControl("Comment")

Neither of these commands brings back any data in editorcomment.Content

Please can you give me some code which will retrieve the Content of the RadEditor field

 

 

1 Answer, 1 is accepted

Sort by
0
Suzan
Top achievements
Rank 1
answered on 16 Aug 2017, 12:29 PM

Further information

I can get the value of other controls on the page. It is just the RadEditor that I am having problems with

For example

I can get the value of this drop down list

assess_grade = CType(MyUserControl.FindControl("ddlassessgrade"), RadDropDownList).SelectedItem.Value

Is there something extra I have to do for a RadEditor control

 

Tags
Grid
Asked by
Suzan
Top achievements
Rank 1
Answers by
Suzan
Top achievements
Rank 1
Share this question
or