Ext.Msg.notify

  1. #1

    Ext.Msg.notify

    I have a combobox that I have added a notification. How I can display the contents of the combobox in the notification?
    
       <ext:ComboBox ID="camp"
                        runat="server"
                        Editable="false" 
                        FieldLabel="Campaña"
                        StoreID="dsCampas"
                        DisplayField="Name"
                        ValueField="CampaignID"
                        ForceSelection="true"
                        TypeAhead="true" 
                        TriggerAction="All" 
                        Mode="Remote"
                        AllowBlank="false"
                        PageSize="10"
                        SelectOnFocus="false" 
                        AnchorHorizontal="100%"
                        DataIndex="Name"
                        >  
                        <Listeners>
                            <BeforeSelect Handler="#{Button2}.setDisabled(false);Ext.Msg.notify('Button Click', camp.ValueField );" />
                        </Listeners> 
       </ext:ComboBox>
    I've tried #{camp}.getvalue(), camp.value, camp.displayvalue .... and I did not succeed.
    If for example I use camp.mode I get me out remote

    Thanks and sorry for my bad English
  2. #2
    Hi,

    I believe it would be #{camp}.getValue(). Please note the use of the uppercase 'V' in Value.

    Example

    #{camp}.getValue()
    Geoffrey McGill
    Founder
  3. #3
    More information available in the client-side docs, see

    http://dev.sencha.com/deploy/dev/doc...ember=getValue
    Geoffrey McGill
    Founder
  4. #4
    I've tried #{camp}.getValue() and I did not succeed.
  5. #5
    I tested a simplified version of your code and it does appear to work correctly when calling .getValue().

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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:ComboBox 
                ID="ComboBox1"
                runat="server"
                FieldLabel="Country">
                <Items>
                    <ext:ListItem Text="Austria" />
                    <ext:ListItem Text="Bulgaria" />
                    <ext:ListItem Text="Canada" />
                </Items>
                <Listeners>
                    <Select Handler="Ext.Msg.notify('Value', #{ComboBox1}.getValue());" />
                </Listeners> 
            </ext:ComboBox>
        </form>
    </body>
    </html>
    In the code you posted, you have configured the <BeforeSelect> event, which will fire before the item has been selected. This will give the affect of appearing to return the last item, not the current item.

    I've changed to the <Select> event in my code.

    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. notify the User when the cell editor is not valid
    By ascsolutions in forum 1.x Help
    Replies: 2
    Last Post: Apr 05, 2012, 6:16 PM
  2. notify the User when the cell editor is not valid
    By ascsolutions in forum 1.x Help
    Replies: 2
    Last Post: Mar 20, 2012, 3:42 PM
  3. X.Msg.Notify show with delay ?
    By xtremexploit in forum 1.x Help
    Replies: 2
    Last Post: Feb 17, 2012, 10:00 PM
  4. [CLOSED] [1.0] X.Msg.Notify bug?
    By alliedwallet.com in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 29, 2010, 5:43 PM
  5. X.Msg.Notify with DirectEvent
    By csharpdev in forum 1.x Help
    Replies: 1
    Last Post: Oct 28, 2010, 2:21 PM

Posting Permissions