Aug 20, 2013, 3:01 PM
[CLOSED] FieldSet is not resizing while collapse and expand navigation menu
Hi,
I am creating all controls from code behind. The field set adding at right side panel and navigation menu added at left. The field set border is completely showing if collapse the left side panel. It is not resizing based on expand and collapse the panel. I have given monitor resize property for all whichever is required and also added flex property for all controls in composite field. The field set is not resizing automatically while expand.
I am creating all controls from code behind. The field set adding at right side panel and navigation menu added at left. The field set border is completely showing if collapse the left side panel. It is not resizing based on expand and collapse the panel. I have given monitor resize property for all whichever is required and also added flex property for all controls in composite field. The field set is not resizing automatically while expand.
<%@ Page Language="VB" %>
<%@ 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">
<script runat="server">
Protected Overrides Sub OnLoad(e As EventArgs)
MyBase.OnLoad(e)
If Not Ext.Net.X.IsAjaxRequest Then
BindData()
BindValues()
End If
End Sub
Private Sub BindData()
Dim i As Integer
For i = 0 To 3
LoadSectionControls(i)
Next
End Sub
Private Sub BindValues()
Dim i As Integer
For i = 0 To 3
LoadValuesControls(i)
Next
End Sub
Public Sub LoadValuesControls(indexinfo As Integer)
Ext.Net.X.GetCmp(Of Ext.Net.NumberField)("txtn_" & indexinfo.ToString()).Text = indexinfo
End Sub
Public Sub ReadValues(sender As Object, e As DirectEventArgs)
Dim i As Integer = 0
Dim allvalues As String = ""
For i = 0 To 3
allvalues += Ext.Net.X.GetCmp(Of Ext.Net.NumberField)("txtn_" & i.ToString()).Text + ", "
Next
Ext.Net.X.Js.Alert("All Values = " & allvalues)
End Sub
Public Sub LoadSectionControls(menuCount As Integer)
Dim lnkAssign As New Ext.Net.MenuItem()
lnkAssign.ID = "mnu" + menuCount.ToString()
lnkAssign.Text = "Assign Users " + menuCount.ToString()
lnkAssign.Icon = Ext.Net.Icon.ArrowRight
lnkAssign.BackColor = System.Drawing.Color.White
If menuCount = 0 Then
pnlFormMenuMain.SelectedIndex = 0
End If
lnkAssign.Listeners.Click.Handler = "SetPanelActiveWindow(" + menuCount.ToString() + ")"
Dim menuSepAssign As New Ext.Net.MenuSeparator()
pnlFormMenuMain.Menu.Add(lnkAssign)
pnlFormMenuMain.Menu.Add(menuSepAssign)
Dim sectionAssign As New FieldSet()
sectionAssign.ID = "fldAssignUsers_" & menuCount.ToString()
sectionAssign.Title = "Assign Users " & menuCount.ToString()
sectionAssign.Collapsible = False
sectionAssign.AutoHeight = True
sectionAssign.BodyStyle = "background-color:#ededed; padding:15px 10px 0px px"
sectionAssign.MonitorResize = True
sectionAssign.Padding = 5
'sectionAssign.Flex = 1
sectionAssign.Layout = "form"
sectionAssign.HideLabels = True
sectionAssign.LabelSeparator = ""
Dim pnlAssignCommon As New Ext.Net.Panel()
pnlAssignCommon.ID = "pnlAssignUsers_" & menuCount.ToString()
pnlAssignCommon.Title = ""
pnlAssignCommon.AutoHeight = True
pnlAssignCommon.MonitorResize = True
pnlAssignCommon.Border = False
pnlAssignCommon.Margins = "5,5,5,5"
pnlAssignCommon.BodyStyle = "background-color:#ededed;"
pnlAssignCommon.HideMode = HideMode.Offsets
Dim lblFieldDesc As Ext.Net.Label
Dim comFld As Ext.Net.CompositeField
Dim pnlFld As Ext.Net.Panel
comFld = New Ext.Net.CompositeField
comFld.ID = "comFldNum1_" & menuCount.ToString()
comFld.Listeners.AfterRender.Handler = "this.innerCt.on('afterlayout', function(){this.layout.innerCt.setHeight(22);});"
pnlFld = New Ext.Net.Panel
pnlFld.Header = False
'pnlFld.Width = Unit.Pixel(20)
pnlFld.Flex = 1
pnlFld.ID = "pnlCheckListNum1_" & menuCount.ToString()
pnlFld.BodyStyle = "background-color:#ffffff"
pnlFld.Height = Unit.Pixel(20)
lblFieldDesc = New Ext.Net.Label
lblFieldDesc.ID = "lblNum1_" & menuCount.ToString()
lblFieldDesc.Html = "<b><font color='red'>*</font></b>Assign User " & menuCount.ToString()
lblFieldDesc.Icon = Ext.Net.Icon.ApplicationGo
'lblFieldDesc.Width = 300
lblFieldDesc.Flex = 10
comFld.Items.Add(pnlFld)
comFld.Items.Add(lblFieldDesc)
Dim txtCustomField As New Ext.Net.NumberField()
txtCustomField.ID = "txtn_" & menuCount.ToString()
'txtCustomField.Width = 250
txtCustomField.Flex = 8
txtCustomField.DecimalPrecision = 3
txtCustomField.FieldLabel = "Text Field 1"
txtCustomField.AllowBlank = True
comFld.Items.Add(txtCustomField)
sectionAssign.Items.Add(comFld)
comFld = New Ext.Net.CompositeField
comFld.ID = "comFldNum2_" & menuCount.ToString()
comFld.Listeners.AfterRender.Handler = "this.innerCt.on('afterlayout', function(){this.layout.innerCt.setHeight(22);});"
pnlFld = New Ext.Net.Panel
pnlFld.Header = False
'pnlFld.Width = Unit.Pixel(20)
pnlFld.Flex = 1
pnlFld.ID = "pnlCheckListNum2_" & menuCount.ToString()
pnlFld.BodyStyle = "background-color:#ffffff"
pnlFld.Height = Unit.Pixel(20)
lblFieldDesc = New Ext.Net.Label
lblFieldDesc.ID = "lblNum2_" & menuCount.ToString()
lblFieldDesc.Html = "<b><font color='red'>*</font></b>Assign User Value"
lblFieldDesc.Icon = Ext.Net.Icon.ApplicationGo
'lblFieldDesc.Width = 300
lblFieldDesc.Flex = 10
comFld.Items.Add(pnlFld)
comFld.Items.Add(lblFieldDesc)
Dim spnField As New Ext.Net.SpinnerField()
spnField.ID = "spnr_" & menuCount.ToString()
spnField.AllowBlank = True
spnField.FieldLabel = "Spinner Field " & menuCount.ToString()
'spnField.Width = 250
spnField.Flex = 8
spnField.DecimalPrecision = 3
comFld.Items.Add(spnField)
sectionAssign.Items.Add(comFld)
pnlAssignCommon.Items.Add(sectionAssign)
pnlFields.Items.Add(pnlAssignCommon)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script language="javascript" type="text/javascript">
var SetPanelActiveWindow = function (index) {
Ext.getCmp("pnlFields").layout.setActiveItem(index);
};
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="resMngr" runat="server" />
<ext:Viewport ID="vpReqFields" runat="server" Layout="border" StyleSpec="background-color: #C9D9ED;">
<Items>
<ext:Panel ID="pnlAll1003Sections" runat="server" Collapsible="true" Region="West"
Width="220" Split="true" Border="true" Title="Start New Loan" BodyStyle="background-color:#ededed;"
Layout="Border">
<Items>
<ext:Panel ID="pnlLeftCtrls" runat="server" Region="Center" Layout="BorderLayout"
Border="false">
<Items>
<ext:Panel ID="pnl1003Information" runat="server" Title="" Border="false" Icon="Application"
Layout="Border" Region="Center">
<Items>
<ext:MenuPanel ID="pnlFormMenuMain" runat="server" Region="Center" Border="false">
</ext:MenuPanel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
<ext:Panel ID="pnlTabs" runat="server" Region="Center" Layout="BorderLayout" Border="false"
MonitorResize="true">
<Items>
<ext:TabPanel ID="tabSections" runat="server" Title="TabPanel" ActiveIndex="0" Region="Center"
StyleSpec="background-color: #C9D9ED;" Plain="true">
<Items>
<ext:Panel ID="pnlPain" runat="server" BodyStyle="background-color:#ffffff" Border="true"
MonitorResize="true" Title="Loan Data" Layout="BorderLayout">
<Items>
<ext:Panel ID="frmLoan" runat="server" BodyStyle="background-color:#ededed;" MonitorResize="true"
Layout="BorderLayout" Title="" ButtonAlign="Center" Region="Center" Margins="5,5,5,5">
<Items>
<ext:Panel ID="pnlFields" runat="server" Title="Loan" Header="false" Layout="card"
ActiveIndex="0" Padding="20" BodyStyle="background-color:#ededed;" BodyBorder="false"
Region="Center" AutoScroll="true" ButtonAlign="Center">
<TopBar>
<ext:Toolbar ID="tbHeader" runat="server" Height="28">
<Items>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
</Items>
<Buttons>
<ext:Button ID="btnCheck" Text="Read Values" runat="server">
<DirectEvents>
<Click OnEvent="ReadValues">
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:TabPanel>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Sep 02, 2013 at 3:48 AM.
Reason: [CLOSED]