[CLOSED] [1.0] Issue detecting pressed button state

  1. #1

    [CLOSED] [1.0] Issue detecting pressed button state

    Hi,

    I`ve a problem detecting the pressed state of button with "EnabledToogle" at codebeind, I use the next code in load event:

    if( !IsPostBack || !X.IsAjaxRequest )
    {
        FxGridPanel1.PageSize = Convert.ToInt16( _configuracion["PageSize"].Valor );
        FxGridPanel1.RemotePageSize = Convert.ToInt16( _configuracion["RemotePageSize"].Valor );
        FxGridPanel1.Paginador.PageSize = FxGridPanel1.PageSize;
        FxGridPanel1.ViewDeleted = false;				
    }
    else
    {
        //Estos valores se establece en cada request.
        FxGridPanel1.PageSize = _paginador.PageSize;
        FxGridPanel1.RemotePageSize = 500; //Pendiente.
        FxGridPanel1.ViewDeleted = FxGridPanel1.TbViewDeleted.Pressed;
    }
    But .Pressed property does not correspond with the visual state of button, and when fire store_refresh event the .Pressed value change although button remain its visual state.

    Any ideas

    Thanks

    Rafa
    Last edited by geoffrey.mcgill; Jul 07, 2010 at 2:09 AM.
  2. #2

    RE: [1.0] Issue detecting pressed button state

    Sorry, the correct code was:

    if( !IsPostBack && !X.IsAjaxRequest )
    {
        FxGridPanel1.PageSize = Convert.ToInt16( _configuracion["PageSize"].Valor );
        FxGridPanel1.RemotePageSize = Convert.ToInt16( _configuracion["RemotePageSize"].Valor );
        FxGridPanel1.Paginador.PageSize = FxGridPanel1.PageSize;
        FxGridPanel1.ViewDeleted = false;            
    }
    else
    {
        //Estos valores se establece en cada request.
        FxGridPanel1.PageSize = _paginador.PageSize;
        FxGridPanel1.RemotePageSize = 500; //Pendiente.
        vFxGridPanel1.ViewDeleted = FxGridPanel1.TbViewDeleted.Pressed;
    }
    Thanks
    Last edited by geoffrey.mcgill; Jul 07, 2010 at 2:15 AM.
  3. #3

    RE: [1.0] Issue detecting pressed button state

    Hi,

    Please provide test sample
    Here is my test case
    <%@ 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></title>
        
        <script runat="server">
            protected void ToggleHandler(object sender, DirectEventArgs e)
            {
                X.Msg.Notify("Pressed", Button1.Pressed.ToString()).Show();
            }
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" ScriptMode="Debug" />
            
            <ext:Button ID="Button1" runat="server" EnableToggle="true" Text="Press me">
                <DirectEvents>
                    <Toggle OnEvent="ToggleHandler" />
                </DirectEvents>
            </ext:Button>
        </form>
    </body>
    </html>
  4. #4

    RE: [1.0] Issue detecting pressed button state

    Hi Vlad,

    Thanks, works.




    Regards


    Rafa

Similar Threads

  1. [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
  2. Replies: 4
    Last Post: Nov 19, 2010, 1:39 PM
  3. [CLOSED] How to know if an image button is pressed = true using javascript?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 25, 2010, 8:20 PM
  4. [CLOSED] How to make an image button pressed when the user clicks it?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 01, 2010, 2:26 AM
  5. Replies: 3
    Last Post: Mar 10, 2009, 11:56 AM

Posting Permissions