[CLOSED] When i press enter button in any control of from panel its call last control (btnCancel_click) event call automalically

  1. #1

    [CLOSED] When i press enter button in any control of from panel its call last control (btnCancel_click) event call automalically

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MultiComboBox.aspx.cs" Inherits="MultiComboBox" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script type="text/javascript">
            var FromLoaded = function (store, records) {
                if (Ext.getCmp('fpnlEdit') != undefined) {
                    if (records.length > 0) {
                        fpnlEdit.form.loadRecord(records[0]);
                    }
                }
            };
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="RMS" runat="server" Namespace="">
        </ext:ResourceManager>
        <ext:Store ID="fpnlEdit_Store" runat="server">
            <Listeners>
                <Load Fn="FromLoaded" />
            </Listeners>
        </ext:Store>
        <ext:Viewport runat="server" ID="vpItemAdd" Layout="BorderLayout">
            <Items>
                <ext:FormPanel ID="fpnlEdit" runat="server" Border="false" ButtonAlign="Left" AutoScroll="true"
                    Title="Add Details" BodyPadding="50" Region="Center">
                    <Items>
                        <ext:FieldSet ID="FsEdit" runat="server" Border="false" Layout="FormLayout">
                            <Items>
                                <ext:MultiCombo ID ="ddlMulti" FieldLabel="Items" runat="server" EmptyText="Select" Name="EtextValue" SelectionMode="Selection">
                                    <Items>
                                        <ext:ListItem Text="Item 1" Value="1">
                                        </ext:ListItem>
                                        <ext:ListItem Text="Item 2" Value="2">
                                        </ext:ListItem>
                                        <ext:ListItem Text="Item 3" Value="3">
                                        </ext:ListItem>
                                        <ext:ListItem Text="Item 4" Value="4">
                                        </ext:ListItem>
                                        <ext:ListItem Text="Item 5" Value="5">
                                        </ext:ListItem>
                                    </Items>
                                </ext:MultiCombo>
                            </Items>
                        </ext:FieldSet>
                    </Items>
            <Buttons>
            <ext:Button ID="btnSaveEmail" runat="server" Text="Save & Email" Icon="EmailEdit"
                            Width="125" StandOut="false" ToolTip="Save & Email" Margins="0 10 0 0">
                            <Listeners>
                                <Click Handler="if (!fpnlEdit.isValid()){Ext.Msg.show({
                                            title: 'Alert',
                                            msg: 'Some field contains empty value OR some field contains invalid entry',
                                            buttons: Ext.Msg.OK,
                                            maxWidth: '400',
                                            icon: Ext.MessageBox.ERROR
                                        }); return false;} else btnSaveEmail.setDisabled(true);" />
                            </Listeners>
                            <DirectEvents>
                                <Click OnEvent="btnSaveEmail_click" Failure="btnSaveEmail.setDisabled(true);" Success="btnSaveEmail.setDisabled(false);"
                                    IsUpload="true" FormID="fpnlEdit">
                                    <ExtraParams>
                                        <ext:Parameter Name="config" Value="getSubmitData()" Mode="Raw" AutoDataBind="true">
                                        </ext:Parameter>
                                        <ext:Parameter Name="DeletedFiles" Value="DeletedFiles" Mode="Raw" Encode="true">
                                        </ext:Parameter>
                                        <ext:Parameter Name="UploadedFiles" Value="UploadedFiles" Mode="Raw" Encode="true">
                                        </ext:Parameter>
                                    </ExtraParams>
                                    <EventMask Msg="Loading.." ShowMask="true" CustomTarget="fpnlEdit" Target="CustomTarget" />
                                </Click>
                            </DirectEvents>
                        </ext:Button>                  
                        <ext:Button ID="btnCancle" runat="server" Text="Cancel" Icon="Cancel" Width="100"
                            StandOut="false" ToolTip="Return to List Page">
                            <Listeners>
                                <Click Handler="resetControls();" />
                            </Listeners>                                          
                            <DirectEvents>
                                <Click OnEvent="btnCancel_click">
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                    </Buttons>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by geoffrey.mcgill; Aug 26, 2013 at 11:47 PM. Reason: [CLOSED]
  2. #2
    Hi @legaldiscovery,

    Thank you for the report. Fixed in SVN trunk.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @legaldiscovery,

    Thank you for the report. Fixed in SVN trunk.
    i am downloading SVN trunk from "http://www.ext.net/download/" its not working for same Issue , Please give me Download link for latest SVN
  4. #4

Similar Threads

  1. Replies: 2
    Last Post: May 05, 2013, 4:52 AM
  2. Replies: 1
    Last Post: May 25, 2011, 6:06 PM
  3. Replies: 3
    Last Post: Aug 27, 2010, 10:30 PM
  4. [CLOSED] Call client function on image button press
    By flormariafr in forum 1.x Premium Help
    Replies: 1
    Last Post: Feb 03, 2010, 9:34 AM
  5. How to call JavaScript in other control?
    By dbassett74 in forum 1.x Help
    Replies: 1
    Last Post: May 27, 2009, 1:40 PM

Posting Permissions