View Full Version : [CLOSED] treepanel in dropdownfield with not lazyload

Oct 30, 2013, 8:30 AM
Please see the following example which is based on examples:/TreePanel/Loaders/Using_Handler/.

The problem is when dropdown is expanded for the first time it does not expand the tree (not loaded yet!). ut the second time it works when expanded.
It's working if there is a delay on the expand listener is set, ( Delay="100").
Lazymode=instance for treeStore is not working.

Is there any other way to achieve it without Delay?

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

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

<script type="text/javascript">
var handleExpand=function(dd) {
var tree = dd.component;
<!DOCTYPE html>

<head runat="server">
<title>TreePanel with ajax proxy using HttpHandler - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<form runat="server">
<ext:ResourceManager runat="server" />

<h1>TreePanel with ajax proxy using HttpHandler</h1>
<ext:DropDownField ID="DropDownField1" runat="server">
<ext:TreePanel ID="TreePanel3" runat="server" Title="Tree" Height="500" Width="200"
Border="false" RootVisible="false">
<ext:TreeStore ID="TreeStore2" runat="server" LazyMode="Instance" LazyFill="True">
<ext:AjaxProxy Url="TreeLoader.ashx" />
<ext:Node NodeID="0" Text="Root" />
<Expand Handler="handleExpand(this);"></Expand>


Oct 30, 2013, 1:35 PM
Hi @mirwais,

This DropDownField's listeners forces creating its Component.

<AfterRender Handler="this.getPicker();" />

Maybe, it is better to use a TreeStore's Load event in your case?

Oct 30, 2013, 2:57 PM
This DropDownField's listeners forces creating its Component.

<AfterRender Handler="this.getPicker();" />

I'll stick with it. Thank you Daniil.