[CLOSED] [1.0] How to hide default trigger on ComboBox while allowing custom triggers to be visible

  1. #1

    [CLOSED] [1.0] How to hide default trigger on ComboBox while allowing custom triggers to be visible

    I need to create a custom trigger for a ComboBox that I need to use INSTEAD of the built in button. Basically I want no button to expand the ComboBox, but want a custom button that will launch a popup for a different reason.

    I create the custom trigger like so in the Page Load event of the ComboBox:

                Dim trigger As New Ext.Net.FieldTrigger
    
                trigger.HideTrigger = False
                trigger.Icon = Ext.Net.TriggerIcon.Search
                trigger.Qtip = "Select User"
    
                Me.Triggers.Add(trigger)
    I have tried to set the "HideTrigger" property on the ComboBox itself but then all triggers are invisible. I need only the built in one to be invisible.

    This also needs to be done all in server side, no markup changes.
    Last edited by Daniil; Dec 02, 2010 at 4:10 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use the ComboBox's HideTrigger property.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            ComboBox combo = new ComboBox() { HideTrigger = true };
            FieldTrigger ft = new FieldTrigger() { Icon = TriggerIcon.Search };
            combo.Triggers.Add(ft);
    
            this.Form.Controls.Add(combo);
        }
    </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" />
        </form>
    </body>
    </html>
  3. #3
    Daniil,

    I am also working on this problem with mbb...

    This control is being built all server side and then is being used in other pages throughout our solution. Like the original post mentioned, using the HideTrigger property does not work as intended and it hides ALL buttons not just the built in one.

    Here is what the code looks like in the server control:

               Me.HideTrigger = True
    
                ' Create new trigger for the advanced search
                Dim trigger As New Ext.Net.FieldTrigger
    
                trigger.Icon = Ext.Net.TriggerIcon.Search
                trigger.Qtip = "Select User"
    
                Me.Triggers.Add(trigger)
    Currently this code is in PreRender, but I have also tried in Load. These are in the server control again, not in a page's code behind.

    I am continuing to work on various options, but if you know of other ways to hide and show the custom triggers separately from the built in trigger I will try those.

    Thanks...
  4. #4
    Hi,

    Try to add the following cistom config
    combo.CustomConfig.Add(new ConfigItem("standardTrigger", "false", ParameterMode.Raw));
  5. #5
    This works perfectly... thanks and this can be closed.

Similar Threads

  1. Replies: 0
    Last Post: Jul 27, 2012, 7:37 PM
  2. [CLOSED] ComboBox Hide Trigger
    By Adrian in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 09, 2012, 10:36 AM
  3. [CLOSED] [1.0] Triggers not visible for a TriggerField
    By r_honey in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 07, 2010, 10:19 AM
  4. [CLOSED] [1.0] TriggerField default trigger
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Feb 22, 2010, 6:06 AM
  5. Custom triggers with combo
    By jurel in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 30, 2008, 10:47 AM

Posting Permissions