PDA

View Full Version : [CLOSED] Toolbar EnableOverflow="true" (ext 2.5.2)



snow_cap
Jun 19, 2014, 4:35 PM
Hello,
we have a problem when we have multiple b uttons in a toolbar with EnableOverflow="true" , the Click handler will stop working in the automatically hidden buttons in the toolbar.

here a small test web form:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ToolbarOverflow.aspx.cs" Inherits="Ext2._5RTL.ToolbarOverflow" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server"></ext:ResourceManager>
<ext:Viewport runat="server">
<Items>
<ext:Panel runat="server" Width="200">
<TopBar>
<ext:Toolbar runat="server" EnableOverflow="true">
<Items>
<ext:Button runat="server" Text="Button1" Icon="Application"></ext:Button>
<ext:Button ID="Button1" runat="server" Text="Button1" Icon="Application">
<Listeners>
<Click Handler="alert('Button1')"></Click>
</Listeners>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="Button2" Icon="Application">
<Listeners>
<Click Handler="alert('Button2')"></Click>
</Listeners>
</ext:Button>
<ext:Button ID="Button3" runat="server" Text="Button3" Icon="Application">
<Listeners>
<Click Handler="alert('Button3')"></Click>
</Listeners>
</ext:Button>
<ext:Button ID="Button4" runat="server" Text="Button4" Icon="Application">
<Listeners>
<Click Handler="alert('Button4')"></Click>
</Listeners>
</ext:Button>
<ext:Button ID="Button5" runat="server" Text="Button5" Icon="Application">
<Listeners>
<Click Handler="alert('Button5')"></Click>
</Listeners>
</ext:Button>
<ext:Button ID="Button6" runat="server" Text="Button6" Icon="Application">
<Listeners>
<Click Handler="alert('Button6')"></Click>
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>


Thank you

Daniil
Jun 19, 2014, 5:30 PM
Hi @snow_cap,

Thank you for the report.

It is a known problem.
https://github.com/extnet/Ext.NET/issues/21

As a workaround please use a Button's Handler instead of the Click listener.

Daniil
Jan 29, 2015, 5:46 PM
A Button's Click Listener works now in Ext.NET 3.