CommandItemSetting section in RadGrid is not displayed when Grid has less than 10 records - export-to-excel

I'm using CommandItemSettings in MasterTablreView to show Export to Excel button.
The CommandItemSettings section of the grid is displayed when Grid has at least 10 records or when I select less than 10 records using a Pager.
However, with less than 10 records after I click the Search button, the CommandItemSettings section is not there and I cannot export the data into an Excel.
Here is the aspx file:
MOSS2 Merchants Report:
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" EnableAJAX="true">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnSearch">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdMoss2Merchants" LoadingPanelID="RadAjaxLoadingPanel2"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<table class="moss2Search" width="100%">
<tr>
<td colspan="4">
<asp:CustomValidator ID="checkForTwoDates" ClientValidationFunction="AtLeastOneDate_ClientValidate"
EnableClientScript="True" ErrorMessage="At least one date should be selected" runat="server"></asp:CustomValidator> <br />
<asp:CompareValidator ID="CompareValidator2" ControlToCompare="RadDatePicker1" ControlToValidate="RadDatePicker2" Operator="GreaterThanEqual"
ErrorMessage="Date range is not valid" runat="server"></asp:CompareValidator>
</td>
</tr>
<tr>
<td>
<div runat="server">
<asp:Label runat="server" CssClass="dateLabels">Boarding Start Date</asp:Label>
<telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker1" runat="server" onkeydown="keyPress(this, event)">
<Calendar runat="server">
<FastNavigationSettings EnableTodayButtonSelection="true"></FastNavigationSettings>
</Calendar>
</telerik:RadDatePicker>
</div>
</td>
<td>
<div runat="server">
<asp:Label runat="server" CssClass="dateLabels">Boarding End Date</asp:Label>
<telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker2" runat="server" onkeydown="keyPress(this, event)">
<Calendar runat="server">
<FastNavigationSettings EnableTodayButtonSelection="true"></FastNavigationSettings>
</Calendar>
</telerik:RadDatePicker>
</div>
</td>
<td>
<div>
<asp:CheckBox ID="chkMerActive" runat="server" Checked="true" TextAlign="Left"/>Active
</div>
</td>
<td>
<telerik:RadButton RenderMode="Lightweight" runat="server" Text="Search" ID="btnSearch" OnClick="btnSearch_Click"/>
</td>
</tr>
</table>
<asp:Label ID="lblMsg" ForeColor="red" runat="server"></asp:Label>
<br />
</telerik:RadAjaxPanel>
<%----%>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel2">
<telerik:RadGrid
RenderMode="Lightweight"
runat="server"
ID="grdMoss2Merchants"
AllowPaging="True"
AllowSorting="true"
PagerStyle-AlwaysVisible="true"
OnNeedDataSource="BindToDatasource"
OnSortCommand="grdMoss2Merchants_SortCommand"
ViewStateMode="Enabled"
AutoGenerateColumns="false"
OnPageIndexChanged="grdMoss2Merchants_ChangePage"
ClientSettings-Scrolling-ScrollHeight="360px">
<GroupingSettings CaseSensitive="false"/>
<ExportSettings HideStructureColumns="true" ExportOnlyData="true" OpenInNewWindow="true" Excel-Format="Xlsx" IgnorePaging="true" FileName="Moss2Merchants">
<Excel WorksheetName="Moss2Merchants" Format="Xlsx" AutoFitColumnWidth="AutoFitAll" />
</ExportSettings>
<ClientSettings EnableRowHoverStyle="true">
<Scrolling AllowScroll="true" UseStaticHeaders="True"/>
</ClientSettings>
<SortingSettings EnableSkinSortStyles="false" />
<HeaderStyle Width="160px" CssClass="grdHeader" ForeColor="#2E6E9E" />
<MasterTableView AllowNaturalSort="false" CommandItemDisplay="Bottom">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<CommandItemStyle HorizontalAlign="Right" />
<PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" PageSizes="5,10,25,50,100" />
<Columns>
<telerik:GridBoundColumn DataField="Moss2 MID" HeaderText="MOSS2 MID" AllowSorting="false" DataFormatString="{0:#}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DBA" HeaderText="DBA" HeaderStyle-Width="250px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Original MID" HeaderText="ORIGINAL MID" AllowSorting="false" DataFormatString="{0:#}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="BoardingDate"
DataType="System.DateTime"
HtmlEncode="false"
DataFormatString="{0:MM/dd/yyyy}"
SortExpression="BoardingDate"
UniqueName="BoardingDate"
HeaderText="BOARDING DATE"
HeaderStyle-Width="170px"
ShowFilterIcon="false"
/>
<telerik:GridBoundColumn DataField="Status" HeaderText="STATUS" AllowSorting="false"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
The Export To Excel button is showing with Grid having

Related

RadGrid not updating after Filter and Rebind

My problem is that I have 2 radgrids on a page and I cannot filter the columns.
One table is created like this:
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="demo-container" id="demo-container">
<div class="gridPositioning">
<div>
<telerik:RadGrid ID="mdegGrid" runat="server"
AllowPaging="True" AllowCustomPaging="true"
AllowSorting="True"
AllowFilteringByColumn="True"
OnNeedDataSource="mdegGrid_NeedDataSource"
OnItemCommand="mdegGrid_ItemCommand"
OnItemCreated="mdegGrid_ItemCreated"
OnItemDataBound="mdegGrid_ItemDataBound"
OnPreRender="mdegGrid_PreRender"
CellSpacing="0" GridLines="None"
EnableLinqExpressions="false"
PageSize="12"
PagerStyle-AlwaysVisible="true"
EnableEmbeddedSkins="False"
Skin="_HBB"
CellPadding="0"
MasterTableView-CellSpacing="0" >
<GroupingSettings CaseSensitive="false" />
<MasterTableView AutoGenerateColumns="false" TableLayout="Auto" HierarchyLoadMode="ServerOnDemand"
DataKeyNames="ImportID" CommandItemDisplay="None" InsertItemPageIndexAction="ShowItemOnFirstPage">
<CommandItemSettings ShowRefreshButton="false" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn UniqueName="ImportID" HeaderText="<%$ Resources:HBS, Import_ID %>" DataField="ImportID_Filter"
SortExpression="ImportID"
FilterControlWidth="99%" ShowFilterIcon="false"
AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
<HeaderStyle ForeColor="Silver" Height="20px" Width="7%" HorizontalAlign="Left"></HeaderStyle>
<ItemStyle ForeColor="Gray" Height="20px" Width="7%" HorizontalAlign="Left"></ItemStyle>
</telerik:GridBoundColumn>
In the code behind in the mdeGrid_PreRender funtion I have the following code:
mdegGrid.MasterTableView.FilterExpression = string.Format("([{0}] LIKE N\'%{1}%\') ", _columnNameImports, txt.Text);
GridColumn column = mdegGrid.MasterTableView.GetColumnSafe(_columnNameImports);
column.CurrentFilterFunction = GridKnownFunction.Contains;
column.CurrentFilterValue = txt.Text;
mdegGrid.MasterTableView.Rebind();
UpdatePanel2.Update();
The problem is that nothing is happening. The grid becomes disabled with a Please wait loading message but after that, no filtering is happening.

Prevent paging on custom "batch edit" radgrid if changes haven't been saved

We have a pretty customized "batch edit" type screen. Out users frequently make changes, then forget to hit Save before moving on to the next page. I have tried the solutions found here:
[a link] http://www.telerik.com/support/code-library/prevent-losing-batch-editing-changes-on-paging-or-any-other-postback
[a link] http://www.telerik.com/forums/prevent-losing-batch-editing-changes-on-paging-or-any-other-postback
But I end up with errors like "RecordNumber" is neither a DataColumn nor a DataRelation. Here's my code. I'm thinking our grid is just too complicated for these straightforward solutions...?
<%# Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="AssignTeacherAdvisor2.aspx.cs" Inherits="AssignTeacherAdvisor2" Theme="LBL" %>
<%# Register Src="Controls/ActionBar.ascx" TagName="ActionBar" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMainAppTop" runat="Server">
<div id="populateTchrIDs" runat="server">
<%-- <script type="text/javascript" language="javascript">
function KGCalChange(sender, eventArgs) {
//debugger;
if (sender.value == "KG") {
showHideLayer('<%= labelKGCal_Search.ClientID %>', 'show');
showHideLayer('<%= comboKGCal_Search.ClientID %>', 'show');
}
else {
showHideLayer('<%= labelKGCal_Search.ClientID %>', 'hide');
showHideLayer('<%= comboKGCal_Search.ClientID %>', 'hide');
}
}
</script>--%>
<script type="text/javascript">
function clientItemChecking(sender, args)
{
if (sender.get_checkedItems().length == 3 && (args.get_item().get_checked() == false))
{
alert("count exceeded");
args.set_cancel(true);
}
}
function clientItemCheckingC(sender, args) {
if (sender.get_checkedItems().length == 5 && (args.get_item().get_checked() == false)) {
alert("count exceeded");
args.set_cancel(true);
}
}
</script>
</div>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<uc1:ActionBar ID="ActionBarTop" runat="server" CancelVisible="True" ExportVisible="True"
SaveVisible="True" Text="Assign Teacher/Advisor" HelpVisible="True" ExportURL="~/DataExport.aspx?frm=AssignTeacherAdvisor2"
OnSaveClick="ActionBar_SaveClick" OnCancelClick="ActionBar_CancelClick" />
<table class="six" style="width: 100%">
<tr>
<td>
<div class="padded header">
Search and Sort
</div>
</td>
<td align="right">
<asp:HyperLink ID="HyperLinkAdvancedSearch" runat="server" NavigateUrl="javascript:ToggleAdvanced();"
class="advancedSearchLink">
Advanced Search</asp:HyperLink>
</td>
</tr>
</table>
<br />
<asp:HiddenField ID="hiddenField" runat="server" />
<asp:Panel ID="PanelSaveSuccess" runat="server" CssClass="infoMessage" Visible="false">
<asp:Label ID="LabelSaveSuccess" runat="server" Text="Information saved successfully." />
</asp:Panel>
<asp:ValidationSummary ID="ValidationSummaryMain" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server" Display="None" ErrorMessage="CustomValidator"></asp:CustomValidator>
<asp:Panel ID="PanelInputs" runat="server" DefaultButton="WebButtonSearch">
<table class="eight" style="width: 100%">
<tr><td colspan = "8" style="text-align: right;">
<sis:InputLabel ID="lblRunReport" runat="server" Text="Report:" Visible="False" />
<telerik:RadComboBox ID="ddlRunReport" runat="server" Width="160px" Visible="False" AutoPostBack="True" OnSelectedIndexChanged="RadComboBoxReport_SelectedIndexChanged">
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</td>
<td>
<sis:WebButton ID="wbtnRunReport" runat="server" CausesValidation="true" ImageUrl="~/App_Themes/LBL/wbtnRunReport.gif"
AutoTipKey="Run Report" UseCssHover="True" OnClick="wbtnRunReport_Click" Visible="False" />
</td></tr>
<tr>
<td class="start">
<sis:InputLabel ID="lblLastName_Search" runat="server" Text="Last Name:" />
</td>
<td class="start data">
<telerik:RadTextBox ID="txtLastName_Search" runat="server">
</telerik:RadTextBox>
</td>
<td class="start">
<sis:InputLabel ID="lblFirstName_Search" runat="server" Text="First Name:" />
</td>
<td class="start data">
<telerik:RadTextBox ID="txtFirstName_Search" runat="server">
</telerik:RadTextBox>
</td>
<td class="start">
<sis:InputLabel ID="lblGrades_Search" runat="server" Text="Grade Level:"></sis:InputLabel>
</td>
<td>
<telerik:RadComboBox ID="lstGrades_Search" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" Width ="100px" ></telerik:RadComboBox>
<asp:Literal ID="Literal3" runat="server" />
</td>
<td class="end">
<sis:InputLabel ID="lblTeacherAssigned_Search" runat="server" Text="Teacher Assigned:" />
</td>
<td class="end data">
<telerik:RadComboBox ID="cmbTeacherAssigned_Search" runat="server" Width="75px">
<Items>
<telerik:RadComboBoxItem runat="server" Selected="True" Text=" " />
<telerik:RadComboBoxItem runat="server" Text="Yes" Value="Yes" />
<telerik:RadComboBoxItem runat="server" Text="No" Value="No" />
</Items>
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</td>
</table>
<table class="six" style="width: 100%">
<tr>
<td class="start">
<%-- <div id="labelKGCal_Search" runat="server">
<sis:InputLabel ID="lblKGCal_Search" runat="server" Text="KG Calendar:" />
</div>--%>
</td>
<td class="start data">
<%-- <div id="comboKGCal_Search" runat="server" style="width: 301px">
<telerik:RadComboBox ID="cmbKGCal_Search" runat="server" Width="249px" Height="31px">
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</div>--%>
</td>
<td class="end">
</td>
<td class="end data">
</td>
</tr>
</table>
<div id="DivAdvancedSearch" class="advancedSearch" runat="server">
<table class="eight" style="width: 100%">
<tr>
<td class="start">
<sis:InputLabel ID="lblCurrentYearTeacher_Search" runat="server" Text="Current Year Teacher/Advisor:"></sis:InputLabel>
</td>
<td>
<telerik:RadComboBox ID="lstCurrentYearTeacher_Search" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="false" Width ="250px" OnClientItemChecking="clientItemCheckingC" ></telerik:RadComboBox>
<asp:Literal ID="Literal1" runat="server" />
</td>
<td class="start">
<sis:InputLabel ID="lblPriorYearTeacher_Search" runat="server" Text="Prior Year Teacher/Advisor:"></sis:InputLabel>
</td>
<td>
<telerik:RadComboBox ID="lstPriorYearTeacher_Search" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="false" Width ="250px" OnClientItemChecking="clientItemCheckingC"></telerik:RadComboBox>
<asp:Literal ID="Literal2" runat="server" />
</td>
<td class="start">
<sis:InputLabel ID="lblGender" runat="server" Text="Gender:"></sis:InputLabel>
</td>
<td class="start data">
<telerik:RadComboBox ID="cmbGender_Search" runat="server" Width="85px">
<Items>
<telerik:RadComboBoxItem runat="server" Selected="True" Text=" " />
<telerik:RadComboBoxItem runat="server" Text="Male" Value="Male" />
<telerik:RadComboBoxItem runat="server" Text="Female" Value="Female" />
</Items>
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</td>
<td class="end">
<sis:InputLabel ID="lblRowsToDisplay_Search" runat="server" Text="Rows to Display:" />
</td>
<td class="end data">
<telerik:RadComboBox ID="cmbRowsToDisplay_Search" runat="server" Width="65px">
<Items>
<telerik:RadComboBoxItem runat="server" Text="10" Value="10" />
<telerik:RadComboBoxItem runat="server" Text="20" Value="20" />
<telerik:RadComboBoxItem runat="server" Text="30" Value="30" />
<telerik:RadComboBoxItem runat="server" Text="50" Value="50" />
<telerik:RadComboBoxItem runat="server" Text="100" Value="100" />
</Items>
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td class="start">
<sis:InputLabel ID="lblFlags_Search" runat="server" Text="Flags (up to 3):"></sis:InputLabel>
</td>
<td>
<telerik:RadComboBox ID="lstFlags_Search" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="false" Width ="250px" OnClientItemChecking="clientItemChecking"></telerik:RadComboBox>
<asp:Literal ID="itemsClientSide" runat="server" />
</td>
<td class="start">
<sis:InputLabel ID="lblIncludeFlag_Search" runat="server" Text="Include Flag:"></sis:InputLabel>
</td>
<td class="start data">
<telerik:RadComboBox ID="cmbIncludeFlag_Search" runat="server" Width="85px">
<Items>
<telerik:RadComboBoxItem runat="server" Selected="True" Text=" " />
<telerik:RadComboBoxItem runat="server" Text="All Flags" Value="A" />
<telerik:RadComboBoxItem runat="server" Text="One or more" Value="O" />
<telerik:RadComboBoxItem runat="server" Text="None of These" Value="N" />
</Items>
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</td>
<td class="start">
<sis:InputLabel ID="InputLabelCY" runat="server" Text="Cohort Year:" />
</td>
<td class="start data" align="left" style="width: 138px">
<telerik:RadComboBox ID="RadComboBoxCY_Search" runat="server" TabIndex="4" Width="100px">
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
</td>
<td class="end">
</td>
<td class="end data">
</td>
</tr>
</table>
<table style="width: 100%" class="six">
<tr>
<td style="width: 121px" class="start" valign="top">
<sis:InputLabel ID="lblDOBFrom_Search" runat="server" Text="DOB Range - From:"></sis:InputLabel>
</td>
<td style="width: 99px" class="start data" valign="top">
<telerik:RadDatePicker ID="dateDOBFrom_Search" runat="server" Width="100px">
<DateInput InvalidStyleDuration="100">
</DateInput>
</telerik:RadDatePicker>
</td>
<td align="right" style="width: 37px" class="start" valign="top">
<sis:InputLabel ID="lblDOBTo_Search" runat="server" Text="To:"></sis:InputLabel>
</td>
<td align="left" style="width: 113px" class="start data" valign="top">
<telerik:RadDatePicker ID="dateDOBTo_Search" runat="server" Width="100px">
<DateInput InvalidStyleDuration="100">
</DateInput>
</telerik:RadDatePicker>
</td>
<td>
</td>
</tr>
</table>
</div>
<table class="eight" style="width: 100%">
<tr>
<td>
<sis:WebButton ID="WebButtonSearch" runat="server" UseCssHover="true" ImageUrl="~/App_Themes/LBL/wbtnSearch.gif"
AutoTipKey="Search" OnClick="WebButtonSearch_Click" AllowLoadBox="True" />
<sis:WebButton ID="WebButtonReset" runat="server" UseCssHover="true" ImageUrl="~/App_Themes/LBL/wbtnReset.gif"
AutoTipKey="Reset" OnClick="WebButtonReset_Click" />
</td>
</tr>
</table>
<asp:Label ID="lblReturnExceedMax" runat="server" CssClass="ListPageStatus"></asp:Label>
</asp:Panel>
<asp:HiddenField ID="HiddenFieldAdvanced" runat="server" />
<br />
<div class="hr">
<hr />
</div>
<table style="width: 100%">
<tr>
<td align="left" style="width: 90px">
<div id="totals" class="padded header" style="width: 93px">
Students
</div>
</td>
<td align="left">
<sis:WebButton ID="WebButtonTotals" runat="server" ImageUrl="~/App_Themes/LBL/wbtnViewTotals.gif"
AutoTipKey="View totals" OnClick="WebButtonTotals_Click" UseCssHover="true" />
</td>
<td><sis:WebButton ID="WebButtonVerify" runat="server"
ImageUrl="~/App_Themes/LBL/wbtnVerify.gif" AutoTipKey="Verify" onclick="WebButtonVerify_Click"
UseCssHover="True" AlertEnabled="True" AlertIcon="Question"
AlertText="You have requested to verify Teacher/Advisor assignments. Would you like to continue?"
AlertTitle="Verify" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<telerik:RadGrid ID="grdResults" runat="server" AutoGenerateColumns="False"
AllowCustomPaging="True" AllowPaging="True" OnNeedDataSource="grdResults_NeedDataSource"
OnItemDataBound="grdResults_ItemDataBound" OnItemEvent="grdResults_ItemEvent"
VirtualItemCount="999999" GroupingEnabled="False" >
<ExportSettings>
<Pdf PaperSize="Letter" FontType="Subset"></Pdf>
<Csv RowDelimiter="NewLine" ColumnDelimiter="Comma"></Csv>
</ExportSettings>
<MasterTableView CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR" Frame="Border"
TableLayout="Auto" CommandItemDisplay="None" DataKeyNames="RecordNumber" VirtualItemCount="999999"
AllowCustomPaging="true" EditMode="InPlace" PagerStyle-Position="TopAndBottom">
<RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="StudentName.FullName" CurrentFilterFunction="NoFilter"
HeaderText="Preferred Name" UniqueName="Name" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Grade" CurrentFilterFunction="NoFilter" HeaderText="Grade"
ReadOnly="true">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="KindergartenCalendar" UniqueName="KGCal" CurrentFilterFunction="NoFilter"
HeaderText="KG Calendar" Display="False" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Current Year Teacher/Advisor" UniqueName="CurrentTchrID"
DataField="CurrentTeacherID" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<telerik:RadComboBox ID="RadComboBoxTeacher" runat="server" Height="350px">
</telerik:RadComboBox>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="NextTeacherID" UniqueName="NextTchrID" CurrentFilterFunction="NoFilter"
HeaderText="Prior Year Teacher/Advisor" ReadOnly="true">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
</EditColumn>
<PopUpSettings ScrollBars="None" />
</EditFormSettings>
<NoRecordsTemplate>
No Records Returned
</NoRecordsTemplate>
<PagerStyle Position="TopAndBottom" />
</MasterTableView>
<SortingSettings EnableSkinSortStyles="False" />
<ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder" Resizing-ShowRowIndicatorColumn="False">
<Resizing ResizeGridOnColumnResize="True"
AllowColumnResize="True"></Resizing>
</ClientSettings>
</telerik:RadGrid>
<uc1:ActionBar ID="ActionBarBottom" runat="server" CancelVisible="True" ExportVisible="True"
SaveVisible="True" Text="Assign Teacher/Advisor" HelpVisible="True" ExportURL="~/DataExport.aspx?frm=AssignTeacherAdvisor2"
OnSaveClick="ActionBar_SaveClick" OnCancelClick="ActionBar_CancelClick" />
</telerik:RadAjaxPanel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderFooter" runat="Server">
</asp:Content>

RadTextBox Enter Key Closes the Browser Tab

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

Telerik RadGrid Issue:No SelectedItems are shown on Buttonclick although few items are being selected

I have two RadGrids on my aspx page and have used one search TextBox to search items from the RadGrid.
There's a button on click of which the selected items are transferred to other grid.
The problem is when i search the items with particular key word and then select items from the RadGrid and click the button. No action is performed and in the code behint it shows no data items selected. Then if I again select from the searched list and click the button it works fine.
function requestStart(sender, args) {
if (args.get_eventTarget().indexOf("ButtonPrint") > 0
||
args.get_eventTarget().indexOf("ButtonSelect") > 0
)
args.set_enableAjax(false);
}
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="EnrollmentPanel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="EnrollmentPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="RadPanelBar1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ButtonEnroll">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadPanelBar1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadGrid ID="EnrollmentGrid" runat="server" Width="100%" GridLines="None"
AllowPaging="True" ShowStatusBar="true" AutoGenerateColumns="false" DataSourceID="CourseCreditDS"
OnItemCommand="EnrollmentGrid_ItemCommand" OnItemDataBound="EnrollmentGrid_ItemDataBound">
<MasterTableView DataKeyNames="pid" CommandItemDisplay="None">
<Columns>
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="20px" />
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="<%$ Resources: Manager, EditCredit %>"
Visible="false" />
<telerik:GridTemplateColumn UniqueName="AssignedColumn" Visible="false" HeaderStyle-Width="60px">
<ItemTemplate>
<asp:Image runat="server" ImageUrl="~/Contents/Images/tick.gif" ToolTip="<%$ Resources: Manager, SessionAlreadyEnrolled %>" Visible='<%# Eval("enrolled").ToString() == "Y" %>' />
<asp:Image runat="server" ImageUrl="~/Contents/Images/error.gif" ToolTip="<%$ Resources: Manager, SessionAlreadyEnrolledOther %>" Visible='<%# Eval("already_assigned").ToString() == "Y" %>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridHyperLinkColumn HeaderText="<%$ Resources: Manager, StudentId %>" DataTextField="pid"
DataNavigateUrlFields="pid" DataNavigateUrlFormatString="../Reporting/PivotView.aspx?id={0}"
SortExpression="pid" Target="_blank" />
<telerik:GridHyperLinkColumn HeaderText="<%$ Resources: Manager, Name %>" DataTextField="name"
DataNavigateUrlFields="pid" DataNavigateUrlFormatString="../Reporting/PivotView.aspx?id={0}"
SortExpression="lname" Target="_blank" />
<telerik:GridBoundColumn HeaderText="<%$ Resources: Manager, Division %>" DataField="div_name"
SortExpression="div_name" />
<telerik:GridTemplateColumn UniqueName="ResultColumn" HeaderText="<%$ Resources: Manager, Result %>"
Visible="false">
<ItemTemplate>
<asp:Literal ID="ResultText" runat="server" Text="<%$ Resources: Manager, EmptyDataText %>" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn UniqueName="CapIdColumn" HeaderText="<%$ Resources: Manager, CapId %>"
DataField="ot1" SortExpression="ot1" ConvertEmptyStringToNull="true" EmptyDataText="<%$ Resources: Manager, EmptyDataText %>"
Visible="false" />
<telerik:GridTemplateColumn UniqueName="AttachColumn" Visible="false" HeaderText="Attachment">
<ItemTemplate>
<table>
<tr>
<td>
<telerik:RadAsyncUpload ID="CCFileUploader" runat="server" PostbackTriggers="btnUploadPost" OnFileUploaded="CCFileUploader_FileUploaded" OnClientFileUploaded="CCFileUploader_ClientFileUploaded" UploadedFilesRendering="BelowFileInput" />
</td>
<td>
<asp:Button ID="btnUploadPost" runat="server" CausesValidation="false" Text="hidden" Style="display: none" /></td>
<td>
<asp:LinkButton ID="CCExistingUploadsLink" runat="server" Text="<%$ Resources: Manager, NoExistingAttachments %>" Enabled="false" Style="text-decoration: none; color: #769e1a;" />
<asp:HiddenField ID="CCPid" runat="server" Visible="false" Value='<%# Eval("pid")%>' />
</td>
</tr>
</table>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditItemStyle CssClass="EditedItem" />
<EditFormSettings UserControlName="~/Courses/Template/CourseCredit.ascx" EditFormType="WebUserControl">
<FormStyle BackColor="White" />
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
</ClientSettings>
<ExportSettings IgnorePaging="true" OpenInNewWindow="true">
<Pdf PageHeight="297mm" PageWidth="210mm" PageTitle="Training Session" />
</ExportSettings>
</telerik:RadGrid>
<telerik:RadGrid ID="EnrollListGrid" runat="server" Width="100%" GridLines="None" AllowPaging="true" PageSize="10" ShowStatusBar="true" AllowMultiRowSelection="true" AutoGenerateColumns="false" OnDetailTableDataBind="EnrollListGrid_DetailTableDatabind"
OnNeedDataSource="EnrollListGrid_OnNeedDataSource" OnPreRender="EnrollListGrid_OnPreRender">
<PagerStyle Mode="NumericPages"></PagerStyle>
<MasterTableView AllowMultiColumnSorting="true" DataKeyNames="listname">
<DetailTables>
<telerik:GridTableView DataKeyNames="pid" Name="DetailList">
<Columns>
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="20px">
<HeaderStyle Width="20px" />
</telerik:GridClientSelectColumn>
<telerik:GridTemplateColumn UniqueName="AssignedColumn" Visible="false" HeaderStyle-Width="60px">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/Contents/Images/tick.gif" ToolTip="<%$ Resources: Manager, SessionAlreadyEnrolled %>" Visible='<%# Eval("enrolled").ToString() == "Y" %>' />
<asp:Image ID="Image2" runat="server" ImageUrl="~/Contents/Images/error.gif" ToolTip="<%$ Resources: Manager, SessionAlreadyEnrolledOther %>" Visible='<%# Eval("already_assigned").ToString() == "Y" %>' />
</ItemTemplate>
<HeaderStyle Width="60px" />
</telerik:GridTemplateColumn>
<telerik:GridHyperLinkColumn HeaderText="<%$ Resources: Manager, StudentId %>" DataTextField="pid"
DataNavigateUrlFields="pid" DataNavigateUrlFormatString="../Reporting/PivotView.aspx?id={0}"
SortExpression="pid" Target="_blank" />
<telerik:GridHyperLinkColumn HeaderText="<%$ Resources: Manager, Name %>" DataTextField="name"
DataNavigateUrlFields="pid" DataNavigateUrlFormatString="../Reporting/PivotView.aspx?id={0}"
SortExpression="lname" Target="_blank" />
<telerik:GridBoundColumn HeaderText="<%$ Resources: Manager, Division %>" DataField="div_name"
SortExpression="div_name" />
<telerik:GridBoundColumn UniqueName="CapIdColumn" HeaderText="<%$ Resources: Manager, CapId %>"
DataField="ot1" SortExpression="ot1" ConvertEmptyStringToNull="true" EmptyDataText="<%$ Resources: Manager, EmptyDataText %>" />
</Columns>
<EditItemStyle CssClass="EditedItem" />
<EditFormSettings UserControlName="~/Courses/Template/CourseCredit.ascx" EditFormType="WebUserControl">
<FormStyle BackColor="White" />
</EditFormSettings>
</telerik:GridTableView>
</DetailTables>
<Columns>
<%--<telerik:GridClientSelectColumn UniqueName="ClientSelectList" ></telerik:GridClientSelectColumn>--%>
<%--<telerik:GridBoundColumn UniqueName="EnrollListID" HeaderText="Enroll List ID" DataField="listid"></telerik:GridBoundColumn>--%>
<%--<telerik:GridEditCommandColumn UniqueName="ViewListItems" EditText="View List Items" ></telerik:GridEditCommandColumn>--%>
<telerik:GridBoundColumn UniqueName="EnrollListName" HeaderText="Enroll List Name" DataField="listname"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
<%--<ClientEvents OnRowSelecting="EnrollListGrid_OnRowSelecting" />--%>
</ClientSettings>
</telerik:RadGrid>
Please let me know if u need the code behind
Try to ajaxify the source of the binding (i think it's the filtered grid) to the destination of the binding (the second grid).
<telerik:AjaxSetting AjaxControlID="EnrollmentGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="EnrollListGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
Let me know if it help. Otherwise i really need a simpler working version of your code...

0x800a139e - SyntaxError - Telerik RadGrid

i'm trying to execute one jquery function, but it giver me an error and i don't know what is going on. It is really kiling me. I don't know what else i can do.
If someone know's how to fix it, please help me.
error:
Exception was thrown at line 5263, column 7 in localhost:8538/Scripts/jquery-1.8.2.js
0x800a139e - JavaScript runtime error: SyntaxError
<%# Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<%# Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
<script src="Script/jquery-1.8.2.js"></script>
<script>
$(document).ready(function () {
setpager();
});
function setpager() {
$("#grdTeste .rgPagerCell:first").find('div').not(".rgInfoPart").css('display', 'none');
$("#grdTeste .rgPagerCell:last").find('.rgInfoPart').css('display', 'none');
}
</script>
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1><%: Title %></h1>
</hgroup>
</div>
</section>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="50%" valign="bottom" height="25">
<font id="tituloTela" style="padding-left:6px"> Feriados </font>
<input id="Button1" type="button" value="button" onclick="setpager();"/>
</td>
</tr>
</tbody>
</table>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<telerik:RadGrid ID="grdTeste" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" CellSpacing="0"
DataSourceID="SqlDataSource" GridLines="None" PageSize="5" OnNeedDataSource="RadGrid1_NeedDataSource" >
<ExportSettings>
<Pdf PageWidth="">
</Pdf>
</ExportSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="COD_FERIADO" DataSourceID="SqlDataSource" CommandItemDisplay="Top" >
<CommandItemSettings AddNewRecordText="Adicionar Novo Registro" RefreshText="Atualizar"/>
<Columns>
<telerik:GridBoundColumn DataField="DATA" FilterControlAltText="Filter DATA column" HeaderText="DATA" SortExpression="DATA" UniqueName="DATA">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NOME" FilterControlAltText="Filter NOME column" HeaderText="NOME" SortExpression="NOME" UniqueName="NOME">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="COD_FERIADO" DataType="System.Int32" FilterControlAltText="Filter COD_FERIADO column" HeaderText="COD_FERIADO" ReadOnly="True" SortExpression="COD_FERIADO" UniqueName="COD_FERIADO">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<PagerStyle Position="TopAndBottom" AlwaysVisible="true"/>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:StringConexao %>"
DeleteCommand="DELETE FROM feriados WHERE (COD_FERIADO = #COD_FERIADO)"
SelectCommand="SELECT DATA, NOME, COD_FERIADO FROM feriados"
UpdateCommand="UPDATE feriados SET NOME = #NOME, DATA = #DATA WHERE (COD_FERIADO = #COD_FERIADO)"
InsertCommand="INSERT INTO feriados VALUES (NEXT VALUE FOR SEQ_FERIADO_NOVA, #DATA, #NOME)">
<DeleteParameters>
<asp:Parameter Name="COD_FERIADO" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="DATA" />
<asp:Parameter Name="NOME" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="NOME" />
<asp:Parameter Name="DATA" />
<asp:Parameter Name="COD_FERIADO" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
The error is because your are using plain javascript for finding radgrid(telerik controls).
The javascript used for telerik contols is different than the normal javascript for html contols:
To find radgrid with id="grdTeste":
var grdTeste=$find("<%=grdTeste.ClientID%>"); //find radgrid
This will help you to work with radgrid on client side:
Working with Radgrid on client side

Resources