Dim MyGridUControl0 As UserControl = CType(MainContentPlaceHolder.FindControl("UC_Grid_Footer0"), UserControl)Dim MyUGrid0 As RadGrid = CType(MyGridUControl0.FindControl("RadGrid1"), RadGrid)Dim MyFooter0 As System.Web.UI.Control = CType(MyGridUControl0.FindControl("Panel_Footer"), System.Web.UI.Control) RadAjaxManager1.AjaxSettings.AddAjaxSetting(treeView_SideMenu, MyUGrid0)RadAjaxManager1.AjaxSettings.AddAjaxSetting(treeView_SideMenu, MyGridUControl0 )Ok looked at some of the code examples but have not found any like mine, and I am wondering if the way i am doing this works somehow in the update panels. I would hope that this would be built in or easy to change to get the grid to export to PDF, EXCEL or word.
<asp:UpdatePanel ID="UDP1" runat="server">
<ContentTemplate>
<table width="100%">
<tr>
<td align="center"><asp:DropDownList ID="ddlSRpEvent" runat="server" AutoPostBack="true" Width="220px"></asp:DropDownList>  
<asp:DropDownList ID="ddlSrpDay" runat="server" Width="220px" AutoPostBack="true"></asp:DropDownList></td>
</tr>
<tr>
<td align="center"><asp:LinkButton ID="lnkReport" runat="server">View Report</asp:LinkButton></td>
</tr>
<tr>
<td style="height:20px"></td>
</tr>
</table>
<table width="100%">
<tr>
<td align="center">
<telerik:RadGrid ID="myRadGrid" runat="server" Width="95%" BorderWidth="1px" CellPadding="6" GridLines="Horizontal" BorderColor="#404040" Skin="Web20" ExportSettings-Excel-Format="Html"
ExportSettings-ExportOnlyData="true" ExportSettings-OpenInNewWindow="true"
ExportSettings-Pdf-AllowPrinting="true"><ExportSettings><Pdf FontType="Subset" PaperSize="Letter" PageTitle="No Show Report" /><Excel Format="html" FileExtension="NoShow.xlxs" /></ExportSettings>
<MasterTableView AutoGenerateColumns="false" HierarchyDefaultExpanded="false" HierarchyLoadMode="ServerBind" BorderColor="#404040" Font-Size="10" Font-Names="Veranda,arial,sans-serif"
HeaderStyle-HorizontalAlign="Center" GridLines="Horizontal" CommandItemSettings-ShowExportToPdfButton="true" CommandItemDisplay="Top" CommandItemSettings-ShowExportToExcelButton="true"
CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false" CommandItemSettings-ShowExportToWordButton="true">
<AlternatingItemStyle BackColor="#B0C4DE" />
<HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
<Columns>
<telerik:GridBoundColumn HeaderText="UIC" DataField="UIC"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Att UIC" DataField="AUIC"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Rank" DataField="strRank"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Name" DataField="strFullName"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="SRPType" DataField="strShortText"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Date" DataField="dtEventDate"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Time" DataField="StartTime"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Previous SRP" DataField="Srp"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
Protected Sub lnkReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkReport.Click
FillGrid()
End Sub
Private Sub FillGrid()
Dim eventId As String = ddlSRpEvent.SelectedValue
Dim SqlWhere As String = ""
If eventId > "0" AndAlso ddlSRpEvent.SelectedValue > "0" Then
SqlWhere = " intEventid = " & eventId & " and intEventDateId = " & ddlSrpDay.SelectedValue & " "
Else
SqlWhere = " intEventid = " & eventId & " "
End If
SQL = "Sql statment to fill grid" Not Shown"
Dim MyDataTable As DataTable = getData(sql)
Dim MyNewDataTable As New DataTable
MyNewDataTable = MyDataTable.Clone()
Dim theCount As Integer = 0
Dim totalCount As Integer = 0
Dim dtnewRow As DataRow
Dim Unit As String = String.Empty
totalCount = MyDataTable.Rows.Count
For Each row As DataRow In MyDataTable.Rows
If Unit = String.Empty Then
'First Record, just add it.
Unit = row("UIC")
MyNewDataTable.ImportRow(row)
theCount = theCount + 1
Else
If Unit = row("UIC") Then
row("UIC") = ""
MyNewDataTable.ImportRow(row)
theCount = theCount + 1
Else
'row is of different UIC, create a row for totals
dtnewRow = MyNewDataTable.NewRow()
dtnewRow.Item("SRP") = "TOTAL " & theCount
MyNewDataTable.Rows.Add(dtnewRow)
theCount = 0
'add the row with diffent UIC as well
Unit = row("UIC")
MyNewDataTable.ImportRow(row)
theCount = theCount + 1
End If
End If
Next
'Add the Footer row with the the total count
dtnewRow = MyNewDataTable.NewRow()
dtnewRow.Item("SRP") = "TOTAL ALL UIC's " & totalCount
MyNewDataTable.Rows.Add(dtnewRow)
myRadGrid.DataSource = MyNewDataTable
myRadGrid.DataBind()
End Sub
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="Panel_Footer"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Panel_Footer" UpdatePanelCssClass="" /> <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" LoadingPanelID="RadAjaxLoadingPanel_UC" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy> <telerik:RadGrid ID="RadGrid1" Height="300px" runat="server" EnableHeaderContextMenu="true"> <ClientSettings> <Scrolling AllowScroll="True"></Scrolling> </ClientSettings></telerik:RadGrid> <asp:Panel ID="Panel_Footer" runat="server"> <table id="FooterPagingControl" cellpadding="0" cellspacing="0" class="FooterPagingControl"> <tr> <td id="Prevs"> <telerik:RadButton ID="btn_Start" runat="server" Text="RadButton"> <ContentTemplate> <span class="glyphicon glyphicon-step-backward"></span> </ContentTemplate> </telerik:RadButton> <telerik:RadButton ID="btn_Prev" runat="server" Text="RadButton"> <ContentTemplate> <span class="glyphicon glyphicon-play glyphicon-rotate"></span> </ContentTemplate> </telerik:RadButton> </td> <td> <div id="PagesNumbers" runat="server"></div> <%--The LinkButtons are added here dynamically by the code behind --%> </td> <td id="Nexes"> <telerik:RadButton ID="btn_Next" runat="server" Text="RadButton"> <ContentTemplate> <span class="glyphicon glyphicon-play"></span> </ContentTemplate> </telerik:RadButton> <telerik:RadButton ID="btn_End" runat="server" Text="RadButton"> <ContentTemplate> <span class="glyphicon glyphicon-step-forward"></span> </ContentTemplate> </telerik:RadButton> </td> <td id="ComboPaging"> <asp:Label runat="server" ID="lbl_PageSize" Text=" Page size:"></asp:Label> <telerik:RadComboBox ID="DD_PageSize" runat="server" Width="58px" AutoPostBack="True"> <Items> <telerik:RadComboBoxItem Text="10" /> <telerik:RadComboBoxItem Text="20" /> <telerik:RadComboBoxItem Text="25" /> <telerik:RadComboBoxItem Text="50" /> <telerik:RadComboBoxItem Text="100" /> <telerik:RadComboBoxItem Text="200" /> </Items> </telerik:RadComboBox> </td> <td id="Summery"> </td> <td id="Total"> <asp:Label ID="lbl_NumRecord" runat="server" Text=" Label" Font-Bold="true"></asp:Label> <asp:Label ID="lbl_Records" runat="server" Text="Records in "></asp:Label> <asp:Label ID="lbl_NumPages" runat="server" Text="Label" Font-Bold="true"></asp:Label> <asp:Label ID="lbl_Pages" runat="server" Text="Pages"></asp:Label> </td> </tr> </table></asp:Panel>Hi,
I'm utilizing the Telerik captcha control in a SharePoint environment as a security measure to protect forms against spamming. I have 3 layers in my setup. There's a Dev server (DEV), integration server (SIT) and ultimately the user acceptance test server (UAT). Although I have the exact same code, deployed to all the 3 environments, I get different behavior when it comes to Audio Captcha.
On my Dev, I'm able to hear the Audio Captcha once I click on the "Play Audio Code" link. On the other 2 servers, nothing happens. I investigated this further by finding the "guid" passed to the Telerik.Web.UI.WebResource.axd?type=cah&guid={guid} handler.
When I hit this handler from my dev box, I get the audio file. However, hitting the same handler (with a different guid of course) results in the following error in SIT & UAT:
CaptchaAudio Exception
RadCaptcha was not able to generate an audio code Please check the following:
Stating the obvious, I’ve checked all the above points and everything looks good to me.
Here are a few more points to consider:
// Add captcha to the right column
captcha = new RadCaptcha();
captcha.ID = "captcha";
captcha.ErrorMessage = "error";
captcha.EnableRefreshImage = true;
captcha.CaptchaAudioLinkButtonText = "Play Audio Code";
captcha.CaptchaImage.EnableCaptchaAudio = true;
captcha.CaptchaImage.AudioFilesPath = "/_layouts/myproject/forms/RadCaptcha";
// I added the line below later on to debug this issue – didn’t seem to have any effect
captcha.CaptchaImage.UseAudioFiles = true;
Any help is greatly appreciated,
Ali Pourmoghaddam