Notification Icons not displaying

  1. #1

    Notification Icons not displaying

    It seems that several Icons will not show on the Notifications title. In the attached example Icon.Information will display but Icon.Help will not.


    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Threading"%>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!Ext.IsAjaxRequest)
            {
                ScriptManager1.RegisterIcon(Icon.Information);
            }
        }
    
        public static string stub = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.";
        
        protected void Option1_Click(object sender, AjaxEventArgs e)
        {
            Ext.Notification.Show(new Notification.Config
            {
                Title = "Information Icon",
                Icon = Icon.Information,
                Html = stub
            });
        }
        
        protected void Option2_Click(object sender, AjaxEventArgs e)
        {
            Ext.Notification.Show(new Notification.Config
            {
                Title = "Help Icon",
                Icon = Icon.Help,
                Html = stub
            });
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    </head>
    <body>
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        
        <ext:Window ID="Window1" runat="server" Title="Notifications" Width="300" Height="350">
            <Body>
                <ext:Accordion runat="server">
                    <ext:MenuPanel runat="server" Title="Icon Test" SaveSelection="false">
                        <Menu>
                            <Items>
                                <ext:MenuItem runat="server" Text="Show Information Icon">
                                    <AjaxEvents>
                                        <Click OnEvent="Option1_Click" />
                                    </AjaxEvents>
                                </ext:MenuItem>
                                <ext:MenuItem runat="server" Text="Show Help Icon">
                                    <AjaxEvents>
                                        <Click OnEvent="Option2_Click" />
                                    </AjaxEvents>
                                </ext:MenuItem>
                            </Items>
                        </Menu>
                    </ext:MenuPanel>
                </ext:Accordion>
            </Body>
        </ext:Window>
    </body>
    </html>
  2. #2

    RE: Notification Icons not displaying

    Hi Washburn,

    You just need to pre-register both icons. With the current build (v0.8.x), the icons can not be registered during an AjaxEvent. This functionality will be included with the v1.0 release.

    Example

    protected void Page_Load(object sender, EventArgs e)
    {
        if(!Ext.IsAjaxRequest)
        {
            ScriptManager1.RegisterIcon(Icon.Information);
            ScriptManager1.RegisterIcon(Icon.Help);
        }
    }
    Hope this helps.

    Geoffrey McGill
    Founder
  3. #3

    RE: Notification Icons not displaying

    Wow.. the answer was right under my nose:) Thanks for the quick reply as always!!

    Michael

Similar Threads

  1. GridFilters plugin not displaying
    By Skizzot223 in forum 1.x Help
    Replies: 1
    Last Post: Apr 11, 2012, 12:49 PM
  2. [CLOSED] Displaying <, >, [, ] in ListItem
    By pj_martins in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 16, 2011, 5:19 PM
  3. Problems displaying DataView
    By aleonardo83 in forum 1.x Help
    Replies: 4
    Last Post: Feb 10, 2011, 2:15 PM
  4. Problems displaying examples
    By welberger in forum Examples and Extras
    Replies: 2
    Last Post: Nov 30, 2009, 9:08 AM
  5. Replies: 0
    Last Post: Apr 03, 2009, 5:47 AM

Posting Permissions