Custom Drop Down List : Insert Selected Item in Editor.

  •  08-10-2009, 3:36 AM

    Custom Drop Down List : Insert Selected Item in Editor.

    Hi,
     
    I want to give a custom dropdown list to user having some predefined values. The user needs to select the item from list and the item should get inserted in the text editor.
     
    I have wrriten code as below:

    CuteEditor.
    ToolControl tc = Editor1.ToolControls["insertcustombutonhere"];

    if (tc != null)

    {

    System.Web.UI.WebControls.DropDownList ddl1 = new System.Web.UI.WebControls.DropDownList();

    ddl1.Items.Add(new ListItem("-- Select Field --"));

    ddl1.Items.Add(new ListItem("$COMPANY_NAME$", "$COMPANY_NAME$"));

    .......
    .......
     
    ddl1.Attributes["Command"] = "PasteText";
    ddl1.Attributes[
    "onchange"] = "CuteEditor_DropDownCommand(this,'" + ddl1.Attributes["Command"] + "')";
     
    ........
    ....
    }
     
     
    I'm facing two problems :
     
    1. Above code is OK on Internet Explorer but not getting results on FireFox.
    2. I'm not able to maintain the recently selected in the Drop down.
     
     
    Please let me know the solution or any idea.
     
    Thanks and regards.
     
    Avinash Vyas
     
     
View Complete Thread