Oct 03, 2014, 8:53 PM
[CLOSED] Multicombobox list doesn't behave when used in a DropDownField component
Hello:
To reproduce please use this code and follow these steps:
1. Run the page. Click on the down arrow of the dropdown field
2. Click on the down arrow of the combobox that contains Item 2, Item 5. The list of items will be displayed.
3. Try to check Item 1 by clicking anywhere on the Item 1 line. The entire thing disappears.
I haven't tested this exact sample in 2.1.1 but I had something similar in my app that used to work in 2.1.1 and now it doesn't anymore in version 2.5.2.
Any ideas on how to fix it?
Thank you
To reproduce please use this code and follow these steps:
1. Run the page. Click on the down arrow of the dropdown field
2. Click on the down arrow of the combobox that contains Item 2, Item 5. The list of items will be displayed.
3. Try to check Item 1 by clicking anywhere on the Item 1 line. The entire thing disappears.
I haven't tested this exact sample in 2.1.1 but I had something similar in my app that used to work in 2.1.1 and now it doesn't anymore in version 2.5.2.
Any ideas on how to fix it?
Thank you
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>DropDownField Overview - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<script>
var getTasks = function (tree) {
var msg = [],
selNodes = tree.getChecked();
msg.push("[");
Ext.each(selNodes, function (node) {
if (msg.length > 1) {
msg.push(",");
}
msg.push(node.data.text);
});
msg.push("]");
return msg.join("");
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<h1>DropDownField Overview</h1>
<ext:DropDownField
ID="Field3"
runat="server"
Editable="false"
Width="300"
AllowBlur="true"
TriggerIcon="SimpleArrowDown">
<Component>
<ext:TreePanel
runat="server"
Title="My Task List"
Icon="Accept"
Height="300"
Shadow="false"
UseArrows="true"
AutoScroll="true"
Animate="true"
EnableDD="true"
ContainerScroll="true"
RootVisible="false">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:MultiCombo runat="server" SelectionMode="All" Width="260">
<Items>
<ext:ListItem Text="Item 1" Value="1" />
<ext:ListItem Text="Item 2" Value="2" />
<ext:ListItem Text="Item 3" Value="3" />
<ext:ListItem Text="Item 4" Value="4" />
<ext:ListItem Text="Item 5" Value="5" />
</Items>
<SelectedItems>
<ext:ListItem Value="2" />
<ext:ListItem Index="4" />
</SelectedItems>
</ext:MultiCombo>
</Items>
</ext:Toolbar>
</TopBar>
<Root>
<ext:Node>
<Children>
<ext:Node Text="To Do" Icon="Folder">
<Children>
<ext:Node Text="Go jogging" Leaf="true" Checked="False" />
<ext:Node Text="Take a nap" Leaf="true" Checked="False" />
<ext:Node Text="Clean house" Leaf="true" Checked="False" />
</Children>
</ext:Node>
<ext:Node Text="Grocery List" Icon="Folder">
<Children>
<ext:Node Text="Bananas" Leaf="true" Checked="False" />
<ext:Node Text="Milk" Leaf="true" Checked="False" />
<ext:Node Text="Cereal" Leaf="true" Checked="False" />
<ext:Node Text="Energy foods" Icon="Folder">
<Children>
<ext:Node Text="Coffee" Leaf="true" Checked="False" />
<ext:Node Text="Red Bull" Leaf="true" Checked="False" />
</Children>
</ext:Node>
</Children>
</ext:Node>
<ext:Node Text="Kitchen Remodel" Icon="Folder">
<Children>
<ext:Node Text="Finish the budget" Leaf="true" Checked="False" />
<ext:Node Text="Call contractors" Leaf="true" Checked="False" />
<ext:Node Text="Choose design" Leaf="true" Checked="False" />
</Children>
</ext:Node>
</Children>
</ext:Node>
</Root>
<Buttons>
<ext:Button runat="server" Text="Close">
<Listeners>
<Click Handler="#{Field3}.collapse();" />
</Listeners>
</ext:Button>
</Buttons>
<Listeners>
<CheckChange Handler="this.dropDownField.setValue(getTasks(this), false);" />
</Listeners>
</ext:TreePanel>
</Component>
<Listeners>
<Expand Handler="this.component.getRootNode().expand(true);" Single="true" Delay="10" />
</Listeners>
</ext:DropDownField>
</form>
</body>
</html>
Last edited by Daniil; Oct 08, 2014 at 10:49 AM.
Reason: [CLOSED]