[CLOSED] Multicombo always show the same text

  1. #1

    [CLOSED] Multicombo always show the same text

    Is there any way to have a multicombo that always shows the same text no matter what is selected?
    There will be many items available and selected, and I don't want to bother showing what's selected.
    Last edited by Daniil; Jun 04, 2012 at 7:29 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I would try something like this.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.MultiCombo1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "1", "item1" },
                    new object[] { "2", "item2" },
                    new object[] { "3", "item3" }
                };
                store.DataBind();
            }
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:MultiCombo ID="MultiCombo1" runat="server">
                <Store>
                    <ext:Store runat="server">
                        <Reader>
                            <ext:ArrayReader>
                                <Fields>
                                    <ext:RecordField Name="value" />
                                    <ext:RecordField Name="text" />
                                </Fields>
                            </ext:ArrayReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <Listeners>
                    <AfterRender Handler="this.setRawValue('Select items');" />
                    <Select Handler="this.setRawValue('Select items');" />
                </Listeners>
            </ext:MultiCombo>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] ComboBox didn't show all the text
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 18, 2012, 11:38 AM
  2. Can't show a static text-string ...
    By andersgunnare in forum 1.x Help
    Replies: 0
    Last Post: Jun 09, 2011, 8:49 AM
  3. [CLOSED] how to customize text displayed in MultiCombo
    By Leonid_Veriga in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 13, 2011, 7:04 AM
  4. [CLOSED] MultiCombo doesn't select items with comma in text
    By acrossdev in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Oct 19, 2010, 6:56 AM
  5. Why does scrollbar show in HtmlEditor when no text?
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 11, 2009, 4:25 PM

Posting Permissions