PDA

View Full Version : [CLOSED] Treepanel problem nodes expand



JCarlosF
Mar 04, 2013, 4:15 PM
I have a treepanel, I add nodes at runtime,

5755


but I have a problem with the height because when I collapso the first node I can not expand,

5756

use the property autoheight = true does not work, the markup is:



<body >
<form id="Form1" runat="server" >
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:FormPanel ID="FormPanelReport" runat="server" Frame="false" Layout="VBoxLayout" Width="865" AnchorHorizontal="100%" StyleSpec=" padding-left:5px;" Cls="reporte" Border="false" >
<TopBar>
<ext:Toolbar runat="server" ID="toolbarImp" Border="false" Frame="false" Cls="columnModel" >
<Items>
<ext:Button ID="btnImprimir" runat="server" Text="Imprimir" Icon="Printer" OnClientClick="imprimePagina();" />
</Items>
</ext:Toolbar>
</TopBar>
<Items>

<ext:Panel ID="Panel1" runat="server" Height="105" Frame="false" Floatable="false" Header="false" Border="false" Margins="20 0 0 0" Layout="HBoxLayout" >
<Items>
<ext:FieldContainer ID="FieldContainer245" runat="server" >
<Items>
<ext:Image ID="Image1" runat="server" ImageUrl ="../Imagenes/logoReportes.jpg" width="157" Height="69" />
</Items>
</ext:FieldContainer>

<ext:FieldContainer ID="FieldContainerF" runat="server" Layout="VBoxLayout" Width="570" >
<LayoutConfig>
<ext:VBoxLayoutConfig Align ="center" />
</LayoutConfig>
<Items>
<ext:DisplayField ID="DisplayFieldEmpresa" runat="server" Text="--NOMBRE DE LA EMPRESA--" />
<ext:DisplayField ID="DisplayFieldDirEmpresa" runat="server" Text="--Direccion de la empresa--" />
<ext:DisplayField ID="displayFieldTitulo" runat="server" Text="--Titulo Reporte--" MarginSpec="10 0 0 0" />
</Items>
</ext:FieldContainer>
<ext:FieldContainer ID="FieldContainer57" runat="server" >
<Items>
<ext:DisplayField ID="DisplayFieldFecha" runat="server" Text="Fecha" MarginSpec="0 0 0 55" />
</Items>
</ext:FieldContainer>
</Items>
</ext:Panel>

<ext:TreePanel ID="TreePanel1"
runat="server"
Title="Organigrama"
Width="865"
AutoHeight="true"
AutoScroll="false"
UseArrows="true"
RootVisible="false"
MultiSelect="true"
SingleExpand="false"
FolderSort="true"
>
<Root>
<ext:Node Leaf="true" Text="" NodeID="root" ></ext:Node>
</Root>
</ext:TreePanel>

</Items>
</ext:FormPanel>

</form>
</body>

Baidaly
Mar 04, 2013, 11:31 PM
Hello!

Couldn't reproduce your problem. Can you provide your sample to reproduce the problem? I've tried the following sample:


<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html >
<html>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}

</script>
<head runat="server">
<title>TreePanel Refresh - DirectEvent</title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<form id="form1" runat="server">


<ext:FormPanel ID="FormPanelReport" runat="server" Frame="false" Layout="VBoxLayout"
Width="865" AnchorHorizontal="100%" StyleSpec=" padding-left:5px;" Cls="reporte"
Border="false">
<TopBar>
<ext:Toolbar runat="server" ID="toolbarImp" Border="false" Frame="false" Cls="columnModel">
<Items>
<ext:Button ID="btnImprimir" runat="server" Text="Imprimir" Icon="Printer" OnClientClick="imprimePagina();" />
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:Panel ID="Panel1" runat="server" Height="105" Frame="false" Floatable="false"
Header="false" Border="false" Margins="20 0 0 0" Layout="HBoxLayout">
<Items>
<ext:FieldContainer ID="FieldContainer245" runat="server">
<Items>
<ext:Image ID="Image1" runat="server" ImageUrl="../Imagenes/logoReportes.jpg" Width="157"
Height="69" />
</Items>
</ext:FieldContainer>
<ext:FieldContainer ID="FieldContainerF" runat="server" Layout="VBoxLayout" Width="570">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="center" />
</LayoutConfig>
<Items>
<ext:DisplayField ID="DisplayFieldEmpresa" runat="server" Text="--NOMBRE DE LA EMPRESA--" />
<ext:DisplayField ID="DisplayFieldDirEmpresa" runat="server" Text="--Direccion de la empresa--" />
<ext:DisplayField ID="displayFieldTitulo" runat="server" Text="--Titulo Reporte--"
MarginSpec="10 0 0 0" />
</Items>
</ext:FieldContainer>
<ext:FieldContainer ID="FieldContainer57" runat="server">
<Items>
<ext:DisplayField ID="DisplayFieldFecha" runat="server" Text="Fecha" MarginSpec="0 0 0 55" />
</Items>
</ext:FieldContainer>
</Items>
</ext:Panel>
<ext:TreePanel ID="TreePanel1" runat="server" Title="Organigrama" Width="865" AutoHeight="true"
AutoScroll="false" UseArrows="true" RootVisible="false" MultiSelect="true" SingleExpand="false"
FolderSort="true">
<Root>
<ext:Node Text="Composers" Expanded="true">
<Children>
<ext:Node Text="Beethoven" Icon="UserGray">
<Children>
<ext:Node Text="Concertos">
<Children>
<ext:Node Text="No. 1 - C" Icon="Music" Leaf="true" />
<ext:Node Text="No. 2 - B-Flat Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 3 - C Minor" Icon="Music" Leaf="true" />
<ext:Node Text="No. 4 - G Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 5 - E-Flat Major" Icon="Music" Leaf="true" />
</Children>
</ext:Node>
<ext:Node Text="Quartets">
<Children>
<ext:Node Text="Six String Quartets" Icon="Music" Leaf="true" />
<ext:Node Text="Three String Quartets" Icon="Music" Leaf="true" />
<ext:Node Text="Grosse Fugue for String Quartets" Icon="Music" Leaf="true" />
</Children>
</ext:Node>
<ext:Node Text="Sonatas">
<Children>
<ext:Node Text="Sonata in A Minor" Icon="Music" Leaf="true" />
<ext:Node Text="sonata in F Major" Icon="Music" Leaf="true" />
</Children>
</ext:Node>
<ext:Node Text="Symphonies">
<Children>
<ext:Node Text="No. 1 - C Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 2 - D Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 3 - E-Flat Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 4 - B-Flat Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 5 - C Minor" Icon="Music" Leaf="true" />
<ext:Node Text="No. 6 - F Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 7 - A Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 8 - F Major" Icon="Music" Leaf="true" />
<ext:Node Text="No. 9 - D Minor" Icon="Music" Leaf="true" />
</Children>
</ext:Node>
</Children>
</ext:Node>
</Children>
</ext:Node>
</Root>
</ext:TreePanel>
</Items>
</ext:FormPanel>
</form>
</body>
</html>

JCarlosF
Mar 05, 2013, 10:32 PM
I solved

I had the 2.0 version and I upgraded to 2.1.1 and it worked!

thank you!


talking about this, I did the upgrade, but sometimes does not recognize the controls of ext net, why? If I create a new project if recognize them

thanks

Baidaly
Mar 05, 2013, 10:57 PM
talking about this, I did the upgrade, but sometimes does not recognize the controls of ext net, why? If I create a new project if recognize them

thanks

I don't quite understand what do you mean. Maybe you should review your web.config according this: http://examples2.ext.net/#/Getting_Started/Release_Documents/README/ or compare web.config from new project?

Also, check that you doesn't specify the Ext.NET assembly version. You should use the following in your pages:


<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

JCarlosF
Mar 05, 2013, 11:03 PM
I don't quite understand what do you mean. Maybe you should review your web.config according this: http://examples2.ext.net/#/Getting_Started/Release_Documents/README/ or compare web.config from new project?

Also, check that you doesn't specify the Ext.NET assembly version. You should the following:


<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>



okay, I'll check, thanks!

Daniil
Mar 06, 2013, 3:49 AM
VS "Clean Solution" option might be helpful is such cases.

JCarlosF
Mar 06, 2013, 2:36 PM
VS "Clean Solution" option might be helpful is such cases.

Thanks, I've solved the problem