RadioGroup .. Direct Events

  1. #1

    RadioGroup .. Direct Events

    Hello, this is my question I have this
    <ext:RadioGroup runat="server" ColumnsNumber="2" AutomaticGrouping="false">  
                                <Defaults>
                                    <ext:Parameter Name="name" Value="ccType" />
                                    <ext:Parameter Name="style" Value="margin-right:10px;" />
                                </Defaults>                          
                                <Items>
                                    <ext:Radio runat="server" InputValue="1" BoxLabel="Efectivo">
                                    </ext:Radio> 
                                    <ext:Radio runat="server" InputValue="2" BoxLabel="Resposicion">
                                        <DirectEvents>
                                           <Change OnEvent="MostrarVentanaArticulo">
                                           </Change>
                                        </DirectEvents>
                                    </ext:Radio>
                                </Items>
                            </ext:RadioGroup>
    I want to know which Direct Event use when I select the second radio I want to show a window from codebehind, the problem is everything I changed (select, deselect the radio, this windows shows, I only want it to show when I select the radio) .. I tried Activate direct event .. and I have been reading about check event, but in the version I am using is not that event .. please help me (=
  2. #2
    Hi @rookie,

    I would implement it this way.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        [DirectMethod]
        public void ShowWindow()
        {
            this.Window1.Show();
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Window ID="Window1" runat="server" Hidden="true" />
    
            <ext:RadioGroup runat="server" ColumnsNumber="1">
                <Items>
                    <ext:Radio runat="server" BoxLabel="1" />
                    <ext:Radio runat="server" BoxLabel="2">
                        <Listeners>
                            <Change Handler="if (newValue) {
                                                 App.direct.ShowWindow();
                                             }" />
                        </Listeners>
                    </ext:Radio>
                </Items>
            </ext:RadioGroup>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] RadioGroup Events
    By rnfigueira in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: May 23, 2013, 11:28 AM
  2. Direct Events with Razor
    By gdog_5021 in forum 2.x Help
    Replies: 3
    Last Post: Aug 15, 2012, 10:46 AM
  3. Direct Events dynamic Url
    By Tallmaris in forum 1.x Help
    Replies: 1
    Last Post: Aug 18, 2011, 1:26 PM
  4. Replies: 4
    Last Post: Jul 17, 2010, 8:21 AM
  5. [CLOSED] RadioGroup events
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 08, 2009, 7:20 AM

Posting Permissions