CuteEditor - Serializable and Using Repeater List

Last post 08-06-2004, 5:54 PM by BruceD. 3 replies.
Sort Posts: Previous Next
  •  08-06-2004, 1:33 PM 1446

    CuteEditor - Serializable and Using Repeater List

    Is cuteeditor serializable?

     
    If not has anyone used the control within a repeater list?
     
    I have the control in a repeater list, building editing pages dynamically from a DB to allow multiple editors in one page, with varying levels of editing enabled.
    The problem I am having, is since the controls are being added dynamically to the page, I am unable to access the edited text within each editor.
     
    I was going to place the editor object in viewstate, to pass it around on postback, but need to know if it serializable.
     
    If someone knows how I can retrieve the input from the controls in the repeater list that would be helpful and would eliminate the need to place any of the items in viewstate.
     
    I am controlling the load of the controls and their look and feel on the ItemDataBound method from the repeater class, just FYI.

    Drone

    No one knows everything, so I come here to learn and teach.
  •  08-06-2004, 1:59 PM 1447 in reply to 1446

    Re: CuteEditor - Serializable and Using Repeater List

  •  08-06-2004, 3:03 PM 1451 in reply to 1446

    Re: CuteEditor - Serializable and Using Repeater List

    Figures that not long after I ask the question, I get it working.

     
    If you are placing an editor on the page in a repeater list you can have a hard time finding the control on the page to get the data out.
     
    To do that here is what you do,
     
    Since you have a list of repeater items to go through you will need to use a for loop
     
    Dim sEditorID as String = " This is what you called the CuteEditor on the aspx page within the repeater on the aspx page.
     
    For iI = 0 To Me.myRepeater.Items.Count - 1
     
        'Create a new instance of the CuteEditor object
        Dim myCEItem as CuteEditor.Editor = Me.myRepeater.Items(iI).FindControl("sEditorID")
     
        'Response test to see the HTML Code values from the editors
        Response.Write("Editor: " & iI & " value: " & myCEItem.XHTML & "<BR>")
     
        'Response test to see the text values from the editors
        Response.Write("Editor: " & iI & " value: " & myCEItem.text& "<BR>")
     
        'Now that you can retreive the data from the editors in the repeater list you can write a routine to
        'pass the values to your DB or other place of storage.
     
    Next
     
    I placed the above code and a few other things to handle the writing out of data to a single button click event.
     
    This allowed me to do what I wanted, which was have a preview and submit button.

    Drone

    No one knows everything, so I come here to learn and teach.
  •  08-06-2004, 5:54 PM 1452 in reply to 1451

    Re: CuteEditor - Serializable and Using Repeater List

    Drone,

     
    Thanks for the post! This will come in handy...
View as RSS news feed in XML