Mar 20, 2014, 2:02 PM
[CLOSED] CycleButton inside of FormPanel ActiveItem does not change
I have a CycleButton inside of a FormPanel and when you click the Button, inside the DirectChange event, the ActiveItem does not change accordingly. It works fine as long as it is not inside of a FormPanel.
<%@ Page Title="" Language="vb" AutoEventWireup="false" CodeBehind="CycleButton.aspx.vb" Inherits="Adhesion.Web.CycleButtonTest" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ext.Net Example</title>
<script type="text/javascript">
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext2:ResourceManager ID="ResourceManager" runat="server" />
<ext2:FormPanel ID="fpUserActionSettings" runat="server" Border="false" LabelWidth="150"
Cls="bold-form-labels" StyleSpec="padding-top:10px">
<Items>
<ext2:CycleButton ID="CycleButtonContext" runat="server" ShowText="true" Height="34" width="100" >
<Menu>
<ext2:Menu ID="MenuCycleButton" runat="server">
<Items>
<ext2:CheckMenuItem ID="miClient" runat="server" Text="Client" Icon="User" Checked="true">
<DirectEvents>
<Click OnEvent="ContextSelect">
<ExtraParams>
<ext2:Parameter Name="name" Value="Client" Mode="Value" />
</ExtraParams>
</Click>
</DirectEvents>
</ext2:CheckMenuItem>
<ext2:CheckMenuItem ID="miSecurity" runat="server" Text="Security" Icon="ChartLine">
<DirectEvents>
<Click OnEvent="ContextSelect">
<ExtraParams>
<ext2:Parameter Name="name" Value="Security" Mode="Value" />
</ExtraParams>
</Click>
</DirectEvents>
</ext2:CheckMenuItem>
</Items>
</ext2:Menu>
</Menu>
</ext2:CycleButton>
</Items>
</ext2:FormPanel>
</form>
</body>
</html>
Imports Ext.Net
Public Class CycleButtonTest
Inherits System.Web.UI.Page
Private Sub LoadActions(ByVal id As String)
' do some stuff
End Sub
<DirectMethod()>
Public Sub ContextSelect(sender As Object, e As DirectEventArgs)
LoadActions(sender.ID)
End Sub
Private Sub CycleButtonContext_DirectChange(sender As Object, e As DirectEventArgs) Handles CycleButtonContext.DirectChange
Ext.Net.X.Msg.Show(New Ext.Net.MessageBoxConfig With {
.Title = "Critical",
.Message = sender.ActiveItem.Text,
.Buttons = MessageBox.Button.OK,
.Icon = MessageBox.Icon.ERROR
})
End Sub
End Class
Last edited by Daniil; Mar 20, 2014 at 4:51 PM.
Reason: [CLOSED]