views:

700

answers:

1

I have the latest release of the AjaxControlToolkit, and am using an AjaxControlToolkit Html Editor control inside an AjaxControlToolkit ReorderList. I need to be able to access the "content" property so I can write the value to the database but FindControl doesn't find it.

for instance, I can find a TextBox control inside the ItemCommandEvent:

Protected Sub IncludedSectionComponentsReorderList_ItemCommand(ByVal sender As Object, ByVal e As AjaxControlToolkit.ReorderListCommandEventArgs) Handles IncludedSectionComponentsReorderList.ItemCommand

 If e.CommandName = "SaveChanges" Then

        Dim txtSectionComponentLabel As TextBox = CType(e.Item.FindControl("txtSectionComponentLabel"), TextBox)

 End If End Sub

But I can't find an AjaxControlToolkit Html Editor in the same event:

Protected Sub IncludedSectionComponentsReorderList_ItemCommand(ByVal sender As Object, ByVal e As AjaxControlToolkit.ReorderListCommandEventArgs) Handles IncludedSectionComponentsReorderList.ItemCommand

    If e.CommandName = "SaveChanges" Then

         Dim editor As Editor = CType(e.Item.FindControl("3Editor"), Editor)
                strSectionControlValue = editor.Content

    End If

End Sub
A: 

I haven't used the AjaxControlToolKit ReorderList control before, but you may need to access something like the "_OnItemDataBound" event. Sometimes controls are shoved in there when a row is being databound and you can't access them as you would think.

Good luck and hope this helps some.

Chris