drop down customization not working

Last post 07-06-2010, 4:00 AM by Merry. 5 replies.
Sort Posts: Previous Next
  •  07-01-2010, 1:00 PM 62191

    drop down customization not working

    I am trying to either add a custom dropdown or customize the items in the dropdown.  I visisted the develoepr documentation and almost copied the code verbatum, however my custom items do not show up in the dropdown.  LookupConstants.legend is a simple dictionary object.  Thoughts?  I am running version 6.5
     

    CuteEditor.ToolControl toolctrl = ceContentLegend.ToolControls["Codes"];

    if (toolctrl != null)

    {

    CuteEditor.RichDropDownList dropdown = (CuteEditor.RichDropDownList)toolctrl.Control;

    //the first item is the caption

    CuteEditor.RichListItem richitem = dropdown.Items[0];

    dropdown.Items.Clear();

    foreach (KeyValuePair<string, string> pair in LookupConstants.legend)

    {

    dropdown.Items.Add(pair.Key, pair.Value, pair.Value);

    }

    }

  •  07-01-2010, 9:45 PM 62202 in reply to 62191

    Re: drop down customization not working

    Hi ahager,
     
    try
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    5. <html xmlns="http://www.w3.org/1999/xhtml">   
    6. <head id="Head1" runat="server">   
    7.     <title>Untitled Page</title>   
    8. </head>   
    9.   
    10. <script runat="server">   
    11.     
    12.     protected override void OnLoad(EventArgs e)   
    13.     {   
    14.         CuteEditor.ToolControl toolctrl = ceContentLegend.ToolControls["Codes"];   
    15.         if (toolctrl != null)   
    16.         {   
    17.             CuteEditor.RichDropDownList dropdown = (CuteEditor.RichDropDownList)toolctrl.Control;   
    18.             CuteEditor.RichListItem richitem = dropdown.Items[0];   
    19.             dropdown.Items.Clear();   
    20.             dropdown.Items.Add(richitem);   
    21.             dropdown.Items.Add("line 1""<h1>is line 1</h1>");   
    22.             dropdown.Items.Add("line 2""<h2>is line 1</h2>");   
    23.             dropdown.Items.Add("line 3""<h2>is line 1</h2>");   
    24.         }   
    25.   
    26.         base.OnLoad(e);   
    27.     }   
    28. </script>   
    29.   
    30. <body>   
    31.     <form id="form1" runat="server">   
    32.         <CE:Editor ID="ceContentLegend" runat="server">   
    33.         </CE:Editor>   
    34.     </form>   
    35. </body>   
    36. </html>  
    Regards,
     
    ken
  •  07-02-2010, 5:11 AM 62238 in reply to 62191

    Re: drop down customization not working

    Can any one help me I have a drop down in the cute editor
    Selected item of dropdown works properly in ie but in mozilla it doesnt show selected item.
  •  07-02-2010, 2:51 PM 62252 in reply to 62238

    Re: drop down customization not working

    Hi merry,
     
    dynamically populate the dropdown menu
    How to dynamically populate the dropdown menu?( C# | VB )
    This example demonstrates how to programmatically populate the Cute Editor dropdown menu.
     
    Please check this example  in download package, you can find its source code, I tested it in IE&mozilla, it works fine.  Can you extract your code to one one simple page and post it here?  We will try it on our end.
     
    Regards,
    Eric
     
  •  07-02-2010, 2:56 PM 62253 in reply to 62191

    Re: drop down customization not working

    -
  •  07-06-2010, 4:00 AM 62307 in reply to 62252

    Re: drop down customization not working

    Hi ,
     
    I added a Asp.net dropdown control to the tool bar.
     
    The following code is used for that.
     
    CuteEditor.ToolControl subject = edtSubject.ToolControls["insertcustombutonhere"];
    if (subject != null)
    {
                    System.Web.UI.WebControls.DropDownList ddlReferenceSubject = new System.Web.UI.WebControls.DropDownList();
                   for (int intCount = 0; intCount <= 3; intCount++)
                    {
                        ListItem lst = new ListItem("Test" + intCount.ToString(), intCount.ToString());
                        ddlReferenceSubject.Items.Add(lst);
                    }
                    subject.Control.Controls.Add(ddlReferenceSubject);
     }
     
    This works fine IE , but in mozilla , if I select an item from the dropdown , it is not getting selected.
    This issue happens in mozialla
     
    When I ran the firebug and examined the properties of the dropdown,
     
    <select class="CuteEditorDropDown" 
    style="font-family: Comic sans; font-size: smaller; width: 600px;"
     
    name="ctl00$MainContent$edtSubject$ctl00$ctl22"
     unselectable="on" 
    tabindex="-1"
    >
     
    There is style as "unselectable="on" 
     
    Any thought on this..
View as RSS news feed in XML