Ext.Net Link Button on Client Side

  1. #1

    Ext.Net Link Button on Client Side

    I have created window on sever side with LinkButton on bottom

    <ext:Window runat="server" ID="winIndex" Title="Test">
            <AutoLoad Url="index.html" Mode="IFrame" />
            <Buttons>
                <ext:LinkButton runat="server" ID="btn" Text="Test Button">
                    <Listeners>
                        <Click Handler="Ext.msg.alert('Alert','test');" />
                    </Listeners>
                </ext:LinkButton>
            </Buttons>
        </ext:Window>
    i wanted to create this window on client side using javascript this is what i tried

    var CreateWindow = function () {
                var windowConfig = {
                    id: "winIndex",
                    hidden: false,
                    closeAction: "hide",
                    title: "Test",
                    buttons: [
                        {
                            id: "btn",
                            text: "Test Button",
                            listeners:
                                {
                                    click:
                                    {
                                        fn: function (el, e) {
                                            Ext.msg.alert('Alert','test');
                                        }
                                    }
                                }
                        }
                    ],
                    autoLoad: {
                        url: "index.html",
                        nocache: true,
                        mode: "iframe",
                        showMask: true,
                        triggerEvent: "show",
                        reloadOnEvent: true
                    }
                }
                new Ext.Window(windowConfig)
            }
    Window rendered perfectly using javascript too except LinkButton. it draws normal button rather than LinkButton but i need link button just like server side ext control. Any help will be appreciated.
  2. #2
    Hi @Zain,

    This technique is for you:
    http://forums.ext.net/showthread.php...ll=1#post89172

    Using that I got this script:
    buttons: [{
        id: "btn",
        xtype: "netlinkbutton",
        text: "Test Button",
        listeners: {
            click: {
                fn: function(item, e) {
                    Ext.msg.alert('Alert', 'test');
                }
            }
        }
    }]
    Please add xtype: "netlinkbutton".

    Meanwhile, please clarify is there any specific reason why you are on Ext.NET v1 rather than the latest v3?

Similar Threads

  1. Replies: 17
    Last Post: Dec 29, 2012, 6:25 AM
  2. Beta 2: Press button on client side
    By Dominik in forum 2.x Help
    Replies: 0
    Last Post: Jun 01, 2012, 11:30 AM
  3. [CLOSED] How to change the pressed status for button in client side
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 23, 2012, 3:08 PM
  4. Adding an event to Msg button from a client side?
    By ascsolutions in forum 1.x Help
    Replies: 3
    Last Post: Jan 24, 2012, 11:47 AM
  5. [CLOSED] [1.0] passing Extra Parameter to button Click from client-side
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 07, 2010, 12:36 PM

Tags for this Thread

Posting Permissions