PDA

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



legaldiscovery
Aug 22, 2013, 10:45 AM
<%@ 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>

Daniil
Aug 22, 2013, 1:10 PM
Hi @legaldiscovery,

Thank you for the report. Fixed in SVN trunk.

legaldiscovery
Aug 27, 2013, 7:50 AM
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

Daniil
Aug 27, 2013, 8:02 AM
Here is the link.
http://svn.ext.net/premium/trunk/