is it Ext.Net bugs ? or any solution?

  1. #1

    is it Ext.Net bugs ? or any solution?

    Ext.net 2.0 has strange behouvior. RadioGroup is not working properly! CheckedItems always produce zero value: RadioGroup1.CheckedItems ALWAYS zero after checking :( how to solve it?
     [DirectMethod]
    public void TxtVisibility()
    {
        foreach (var item in RadioGroup1.CheckedItems)
    {
        if (item.ID == "rdHourly")
        {
            txtPerHour.Hidden = false;
            txtAtTime.Hidden = true;
    
        }
        else if (item.ID == "rdAtHourly")
        {
            txtPerHour.Hidden = true;
            txtAtTime.Hidden = false;
        }
    
    }
    }
    My Callling :
      <ext:RadioGroup ID="RadioGroup1" 
                            runat="server" 
                            FieldLabel="" 
                            ColumnsNumber="1">
                            <Items>
                              <ext:Radio ID="rdHourly" FieldLabel="IsEveryPerHour" Name="IsEveryPerHour" runat="server"    BoxLabel="Per Hour(s)" Padding="10">
    
                              </ext:Radio>
                              <ext:Radio ID="rdAtHourly" FieldLabel="IsAtHour" Name="IsAtHour" runat="server"   BoxLabel="At" Padding="10">
    
    
                              </ext:Radio>
    
                            </Items>
                              <Listeners>
                                          <Change   Handler="App.direct.TxtVisibility();" ></Change>
                                          </Listeners>
    
                        </ext:RadioGroup>
  2. #2
    Hi,

    You might need to wait for the next Ext.NET v2 release. Your sample appears to be working fine with the latest source.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="Panel=Ext.Net.Panel" %>
    
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    
    <script runat="server">
        [DirectMethod]
        public void DoSomething()
        {
            foreach (var item in this.RadioGroup1.CheckedItems)
            {
                if (item.ID == "Radio1")
                {
                    X.Msg.Notify("Selected", "Radio1").Show();
                }
                else if (item.ID == "Radio2")
                {
                    X.Msg.Notify("Selected", "Radio2").Show();
                }
            }
        }
    </script>
    
    
    <!DOCTYPE html>
        
    <html>
    <head>
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
    
            <ext:RadioGroup ID="RadioGroup1" runat="server" ColumnsNumber="1">
                <Items>
                    <ext:Radio ID="Radio1" runat="server" FieldLabel="Item 1" />
                    <ext:Radio ID="Radio2" runat="server" FieldLabel="Item 2" />
                    </Items>
                <Listeners>
                    <Change Handler="App.direct.DoSomething();" />
                </Listeners>
            </ext:RadioGroup>
    
    
        </form>
    </body>
    </html>
    Geoffrey McGill
    Founder
  3. #3

    Problem with radio

    I'm having the same problem, is there any solution?. I have tried with if radio.checked=true, o with foreach and it doesn't work.
  4. #4

    RadioGroup works only once

    I have same problem with RadioGroup.
    I'm using v2.2

    ===========================

    <DirectMethod()> _
    Public Sub DoSomething()
    For Each item In Me.RadioGroup1.CheckedItems
    If item.ID = "Radio1" Then
    Ext.Net.X.Msg.Notify("Selected", "Radio1").Show()
    ElseIf item.ID = "Radio2" Then
    Ext.Net.X.Msg.Notify("Selected", "Radio2").Show()
    End If
    Next
    End Sub

    =========================

    RadioGroup1.CheckedItems was 1, at first time.
    but when I clicked radio again, it was always 0.
    I tested with button, but same result.
    Please, let me know what I should do. thanks.


    =========================
    <html>
    <head>
    <title>Ext.NET Example</title>
    </head>
    <body>
    <form id="Form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />

    <ext:RadioGroup ID="RadioGroup1" runat="server" ColumnsNumber="1">
    <Items>
    <ext:Radio ID="Radio1" runat="server" FieldLabel="Item 1" />
    <ext:Radio ID="Radio2" runat="server" FieldLabel="Item 2" />
    </Items>
    <Listeners>
    <Change Handler="App.direct.DoSomething();" />
    </Listeners>
    </ext:RadioGroup>

    <ext:Button runat="server">
    <DirectEvents>
    <Click OnEvent="DoSomething"></Click>
    </DirectEvents>
    </ext:Button>
    </form>
    </body>
    </html>
    Last edited by cheongshim; Jul 11, 2013 at 12:51 AM.

Similar Threads

  1. RTL Problem & Solution
    By Paula in forum Examples and Extras
    Replies: 8
    Last Post: May 17, 2012, 12:33 PM
  2. [CLOSED] Missing Files from solution
    By wisdomchuck in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 03, 2011, 5:34 PM
  3. [CLOSED] Best solution for show window
    By smart+ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 17, 2011, 11:03 AM
  4. Replies: 18
    Last Post: Aug 18, 2010, 9:28 PM

Tags for this Thread

Posting Permissions