Multiple instances single page

Last post 05-10-2008, 10:01 AM by GDB. 1 replies.
Sort Posts: Previous Next
  •  05-10-2008, 9:35 AM 40269

    Multiple instances single page

    Newbie question // just installed Cute.
     
    We often incorporate more than one text box on a page and may want to use different toolbars for the different text boxes. In FCKeditor this is controlled by the ToolBar set property. Is there an equivalent feature in Cute?
     
    Thanks
  •  05-10-2008, 10:01 AM 40271 in reply to 40269

    Re: Multiple instances single page

    Just answered my own question through experimenting. The following relates to a GridView control so the code behind is a bit more complex than would be the typical case. The code behind that I used for a simple ASP.NET Table control is listed toward the bottom of this post below the GridView code behind example.
     
     
    aspx markup (two text boxes):
     
    Box #1:

    <EditItemTemplate>

    <CE:Editor ID="CeName" runat="server" AutoConfigure="None" Text='<%# Eval("Name") %>'>

    </CE:Editor>

    </EditItemTemplate>

    Box #2:

    <EditItemTemplate>

    <CE:Editor ID="CeDescription" runat="server" AutoConfigure="Minimal" Text='<%# Eval("Description") %>'>

    </CE:Editor>

    </EditItemTemplate>

     
    Code behind:
     

    using CuteEditor;

     
    Box #1:

    string name = ((Editor)grid.Rows[e.RowIndex].FindControl("CeName")).Text;

     
    Box #2:
    string description = ((Editor)grid.Rows[e.RowIndex].FindControl("CeDescription")).Text;


    -----------------------------------------------------------------------
    Here is the code behind for the editor when used with an ASP.NET Table control (the aspx markup is the same except that it isn't enclosed in a template):

    // Get the values from the Cute Editor

    string newName = CeNewName.Text; // CeNewName is the ID for the particulat text box

    string newDescription = CeNewDescription.Text;

     
View as RSS news feed in XML