I am having a RadTextBox in my page. This control is one of the search criteria to bring the results. The issue is, if I focus on the text box and press enter, the browser window / tab closes immediately. The RadTextBox tag does not have anything other than the runat, ID attributes.
Please share if you have faced a similar issue like this and found a solution.
Source Code:
<%@ Control Language="C#" AutoEventWireup="True" Inherits="Controls_ProductListControl_ProductListControl"
CodeBehind="ProductListControl.ascx.cs" ClientIDMode="AutoID" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script language="javascript" type="text/javascript">
ProductList = {
openAdd: function (catID) {
PopupWindow.open('/ProductCatalog/Popups/AddNewProductDialog.aspx?PID=0&PAID=0&CID=' + catID, 960, 700, ProductList.refreshGrid);
return false;
},
refreshGrid: function () {
$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("refreshGrid");
},
onRequestStart: function (sender, args) {
if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToCsvButton") >= 0 ||
args.get_eventTarget().indexOf("ExportToPdfButton") >= 0) {
args.set_enableAjax(false);
}
}
}
</script>
</telerik:RadScriptBlock>
<div class="heading">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="LinkButtonSearch">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridProducts" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="LinkButtonShowAll">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridProducts" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGridProducts">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridProducts" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:Label ID="LabelProductName" runat="server" Text="<%$ Resources:UI, ProductListControl_Text_LabelProductName %>" />
<telerik:RadTextBox ID="RadTextBoxProductName" runat="server" MaxLength="50"></telerik:RadTextBox>
<asp:Label ID="LabelProductID" runat="server" Text="<%$ Resources:UI, ProductListControl_Text_LabelProductID %>" />
<telerik:RadNumericTextBox ID="RadNumericTextBoxProductID" runat="server" Width="100px"
DataType="System.Int32" MaxLength="9" MaxValue="999999999" MinValue="1" Style="text-align: center">
<NumberFormat DecimalDigits="0" GroupSeparator="" />
</telerik:RadNumericTextBox>
<asp:Label ID="LabelRuleID" runat="server" Text="<%$ Resources:UI, ProductListControl_Text_LabelRuleID %>" Visible="false" />
<telerik:RadTextBox ID="RadTextBoxRuleID" runat="server" Visible="false" />
<asp:LinkButton ID="LinkButtonSearch" runat="server" OnClick="LinkButtonSearch_Click"><%= Resources.UI.ProductListControl_HTML_Search %></asp:LinkButton>
<asp:placeholder ID="Placeholder2" runat="server"><img src="<%= Resources.UI.ProductListControl_HTML_ImagesSearchPng %>" width="14" height="14" alt="<%= Resources.UI.ProductListControl_HTML_Search_1 %>" /></asp:placeholder>
<asp:LinkButton ID="LinkButtonShowAll" runat="server" OnClick="LinkButtonShowAll_Click"><%= Resources.UI.ProductListControl_HTML_ShowAll %> </asp:LinkButton>
<asp:LinkButton ID="LinkButtonAddNew" runat="server"><%= Resources.UI.ProductListControl_HTML_AddNewProduct %></asp:LinkButton>
<asp:LinkButton ID="LinkButtonCopyProducts" runat="server" OnClientClick="window.open('/ProductCatalog/CopyProducts.aspx?catid=0','CopyProducts');"><%= Resources.UI.ProductListControl_HTML_CopyProducts %></asp:LinkButton>
</div>
<br />
<div class="fullrow">
<telerik:RadGrid ID="RadGridProducts" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="RadGridProducts_NeedDataSource" Visible="False" Skin="Windows7" OnItemDataBound="RadGridProducts_ItemDataBound">
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<%--<CommandItemSettings ExportToPdfText="<%$ Resources:UI, ProductListControl_ExportToPdfText_ExportToPdf %>"></CommandItemSettings>--%>
<Columns>
<telerik:GridBoundColumn DataField="pcProductId" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_Product_ID %>" ReadOnly="True" UniqueName="ProductID">
</telerik:GridBoundColumn>
<telerik:GridHyperLinkColumn DataTextField="ExtProductName" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ProductName %>"
UniqueName="ProductDetailLink" DataNavigateUrlFields="pcProductId" DataNavigateUrlFormatString="~/ProductCatalog/ProductDetail2.aspx?PID={0}"> </telerik:GridHyperLinkColumn>
<telerik:GridBoundColumn DataField="ExtEffectiveDate" DataFormatString="{0:d}"
HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_EffectiveDate %>" UniqueName="EffectiveDate"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtPositions" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtPositions %>" ReadOnly="True"
UniqueName="Positions"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtRatingType" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtRatingType %>" ReadOnly="True"
UniqueName="RatingType"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtBaseBillRate" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtBaseBillRate %>"
ReadOnly="True" UniqueName="BaseBillRate" DataFormatString="{0:0.00}" FilterControlWidth="30px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtBasePayRate" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtBasePayRate %>" ReadOnly="True"
UniqueName="BasePayRate" DataFormatString="{0:0.00}" FilterControlWidth="30px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtMargin" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtMargin %>" ReadOnly="True"
UniqueName="Margin" DataFormatString="{0:0.00}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtEntityName" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtEntityName %>" ReadOnly="True"
UniqueName="EntityName"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ExtProductStatus" HeaderText="<%$ Resources:UI, ProductListControl_HeaderText_ExtProductStatus %>" UniqueName="Status">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
</telerik:RadGrid></div>
Thanks, Sriram