[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...
Code:
<%@ 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:
Code:
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);
}
}