[CLOSED] Fieldset collapse codebehind

  1. #1

    [CLOSED] Fieldset collapse codebehind

    Can't figure out how to check the collapsing of a fieldset in codebehind.
    This is what I have (testpage):
    Collapse is always true...

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="fsTest.aspx.cs" Inherits="Test_fsTest" %>
    <!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 id="Head1" runat="server">
        <title>Nieuw</title>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
                <ext:FormPanel ID="fpReception" runat="server" Title="" Frame="true" BodyPadding="5" heigth="400">
                   <Items>
                       <ext:FieldSet ID="fsCluster" runat="server" CheckboxToggle="true" Title="Cluster issue"
                            AutoHeight="true" Collapsed="true" CheckboxName="chbCluster" HideMode="Offsets"
                            Height="100">
                            <Items>
                                <ext:Label runat="server" Text="Open" ID="tfOpen"/>
                            </Items>
                            <listeners>
                                  <Collapse Handler="App.direct.checkCollapse()" />
                            </listeners>
                            </ext:FieldSet>
                       
                        <ext:label runat="server" id="lblCollapsed"/>
                         </Items>
                 </ext:FormPanel>
        </form>
    </body>
    </html>
    CodeBehind:

    using System;
    using Ext.Net;
    
    
    public partial class Test_fsTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ExtNet.IsAjaxRequest)
            {
                tfOpen.Text = "Check";
            }
        }
    
    
        [DirectMethod]
        public void checkCollapse()
        {
            tfOpen.Text = String.Format("Collapsed: {0}", fsCluster.Collapsed);
        }
    }
    Last edited by Daniil; Aug 03, 2012 at 9:22 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Via an extra parameter. This info is not sent from client to server automatically.
  3. #3
    Will do Daniil,

    Just checking if it wasn't a bug :)

    Regards,

    Martin
  4. #4
    Yes, it would be too hard task to mirror all client side changes to server.

Similar Threads

  1. Replies: 1
    Last Post: Mar 07, 2012, 9:39 PM
  2. Replies: 3
    Last Post: Aug 11, 2011, 12:07 PM
  3. Replies: 3
    Last Post: Dec 21, 2010, 3:57 PM
  4. Replies: 4
    Last Post: Aug 19, 2009, 3:01 PM
  5. Replies: 3
    Last Post: Apr 21, 2009, 7:19 PM

Posting Permissions