[CLOSED] How I insert a button in ext.net.Notification?

  1. #1

    [CLOSED] How I insert a button in ext.net.Notification?

    Hi

    I wish to insert a button (with icon) in notifications. This button will call a method in code behind (or direct method) to remove the notification (in databank) and close the notification window.

    It is possible? How i do? The example https://examples2.ext.net/#/MessageB...tion/Overview/ appears don´t work.

    Thanks for any help.
    Last edited by Daniil; Feb 20, 2012 at 5:50 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Only via an <ext:Tool> in Tools.
  3. #3
    I forgot about ContentEl.

    The following example will work with the next release.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            NotificationConfig cfg = new NotificationConfig()
            {
                Title = "Title",
                ContentEl = "my-div"
            };
            Notification.Show(cfg);
        }
    </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 v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <div id="my-div" class="x-hidden">
                <ext:Button runat="server" Text="Click me">
                    <Listeners>
                        <Click Handler="alert('Hello World!');" />
                    </Listeners>
                </ext:Button>
            </div>
        </form>
    </body>
    </html>
  4. #4
    Hi Daniil...

    Thanks a lot for your help!

    I can´t check if this example works, because I get this error:

    Run time error: The object don´t support this property or method 'removeClass'.

    In another Thread, you told me to wait the DP2.
  5. #5
    Yes, unfortunately, this won't work with DP1. Therefore I wrote:
    The following example will work with the next release.
  6. #6
    Ops!

    Sorry about this!
  7. #7
    No problem!

Similar Threads

  1. [CLOSED] Error when i click in Pin button of ext.net.Notification
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 20, 2012, 1:46 PM
  2. Replies: 3
    Last Post: Feb 02, 2010, 6:32 PM
  3. [CLOSED] [1.0] Insert button into toolbar...
    By state in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Oct 23, 2009, 7:25 PM
  4. [CLOSED] Notification: hide close button when AutoHide = false
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 16, 2009, 3:10 PM
  5. Insert Code Toolbar Button
    By LeeTheGreek in forum 1.x Help
    Replies: 1
    Last Post: Jan 23, 2009, 12:13 PM

Posting Permissions