Problem of Radio State

  1. #1

    Problem of Radio State

    Hi,

    i've build a radio group in page:

    <ext:ResourceManager ID="ResourceManager1" runat="server" StateProvider="Cookie"/> 
     <ext:RadioGroup runat="server" ID="chkKeys">
                                                    <Items>
    <ext:Radio ID="chkMove" BoxLabel="Move" runat="server" Stateful="true" StateID="stateMove">
                                                            <DirectEvents>
                                                                <Check OnEvent="chkKeys_OnChange">
                                                                </Check>                                                           
                                                            </DirectEvents>                                                       
                                                        </ext:Radio>
    ...
     </Items>
                                                </ext:RadioGroup>
    But they can't save the radio state,what happend?
    Last edited by geoffrey.mcgill; Nov 25, 2010 at 7:13 PM. Reason: please use [CODE] tags
  2. #2
    Hi,

    Please wrap any code in [CODE ] tags, see
    http://forums.ext.net/showthread.php...ing-New-Topics

    By default there is no support state saving and restoring.

    Please see how it can be implemented. The commented-out Listeners may help you to achieve some custom requirements.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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 Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" StateProvider="Cookie" />
        <ext:Radio 
            runat="server" 
            Name="group1" 
            StateEvents="check">
            <GetState Handler="return {value: this.getValue()}" />
            <%--<Listeners>
                <BeforeStateSave Handler="" />
                <BeforeStateRestore Handler="" />
            </Listeners>--%>
        </ext:Radio>
        <ext:Radio 
            runat="server" 
            Name="group1"  
            StateEvents="check" >
            <GetState Handler="return {value: this.getValue()}" />       
        </ext:Radio>
        </form>
    </body>
    </html>
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Please wrap any code in [CODE ] tags, see
    http://forums.ext.net/showthread.php...ing-New-Topics

    By default there is no support state saving and restoring.

    Please see how it can be implemented. The commented-out Listeners may help you to achieve some custom requirements.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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 Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" StateProvider="Cookie" />
        <ext:Radio 
            runat="server" 
            Name="group1" 
            StateEvents="check">
            <GetState Handler="return {value: this.getValue()}" />
            <%--<Listeners>
                <BeforeStateSave Handler="" />
                <BeforeStateRestore Handler="" />
            </Listeners>--%>
        </ext:Radio>
        <ext:Radio 
            runat="server" 
            Name="group1"  
            StateEvents="check" >
            <GetState Handler="return {value: this.getValue()}" />       
        </ext:Radio>
        </form>
    </body>
    </html>
    Thank you for you help,problem solved now.

Similar Threads

  1. [CLOSED] Saving grid state using CookieProvider - problem
    By voipswitch in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 11, 2011, 12:44 PM
  2. [CLOSED] Problem with Radio with Content
    By paulc in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 08, 2011, 9:52 AM
  3. [CLOSED] Radio Button Listener Check event problem
    By ogokgol in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 21, 2011, 2:46 PM
  4. State in cookie problem....
    By mrozik in forum 1.x Help
    Replies: 1
    Last Post: Sep 09, 2009, 5:14 AM
  5. [CLOSED] Dynamic Creation of Radio Buttons within Radio Group
    By Steve in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 04, 2009, 1:13 PM

Tags for this Thread

Posting Permissions