Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
314 views

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>&nbsp;&nbsp&nbsp;
                                        <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

Princy
Top achievements
Rank 2
 answered on 07 Jul 2014
1 answer
181 views
Hello 

I am currently working on project that contains a user-control. 
Inside the user-control there are the following: 
A RadGrid, an Asp:Panel  and RaAjaxManajerProxy.
The ASP PANEL wraps several controls (LinkButtons, RadButtons etc.) 
The user-control is managed by the RadAjaxManajerProxy. 

I have the following problem:
The first time the page is loaded, the Telerik controls inside the Asp:Panel
are not working (RadComboBox does not open and RadButtons does not respond).
However, the default ASP controls work (LinkButton etc.)
After I click one time on one of the LinkButtons, all other Telerik controls
start to work (after POSTBACK).

What exactly is going on here? 
How to solve the problem?

Thank 
Daniel.


ASPX:
<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>
Princy
Top achievements
Rank 2
 answered on 07 Jul 2014
2 answers
273 views
I use crystal reports and use RTF Text interpretation for a description field and store the value of this description RTF in an MS SQL Database Text Column. I need to allow my users to create / edit this description via a web portal and am using the RadEditor. The import of RTF is fine using a memory stream, but I need to use the export to RTF and not have it download a file to the user, but use the exported RTF to store in the database field. Is there a way to override the export to export to a memory stream instead of a file for download?

Thanks,

Philip Carter
Philip
Top achievements
Rank 1
 answered on 05 Jul 2014
4 answers
328 views
Hi,

Can the following functionality be achieved without using xml file

http://www.telerik.com/community/forums/aspnet-ajax/editor/how-to-programatically-create-radeditor-with-no-menus.aspx#1408928

Thanks,
Ramesh
Patrick
Top achievements
Rank 1
 answered on 05 Jul 2014
9 answers
310 views
Hi

Is there any way I can make the RadAsyncUpload control responsive?

Thanks
Vishnu.
Vishnu
Top achievements
Rank 1
 answered on 05 Jul 2014
18 answers
957 views

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:

  • Make sure that directory named RadCaptcha exists in the application’s APP_Data folder
  • Make sure that you have specified a valid path to the directory containing the audio (*.wav) files. Use CaptchaImage . AudioFilesPath property to set the path to the folder containing the files..
  • Make sure that there is an audio file for every possible character that might appear in the Textcode. The audio files must be named “Char”.wave. i.e. A.wav, B.wav, C.wav, 1.wave etc.
  • Make sure your application is running in Full Trust environment

Stating the obvious, I’ve checked all the above points and everything looks good to me.

Here are a few more points to consider:

  1. The same .wsp package has been deployed to all the servers which implies the following
    1. Audio files are copied to a folder called “RadCaptcha” that exists under the LAYOUTS folder (I’ve verified this on all the servers and the audio files DO exist)
    2. The code deployed is identical
    3. I can hit the audio files externally from IE by referencing their location under /_layouts/
  2. The Web.Config are identical
    1. I swapped the web.configs between DEV & SIT, nothing broke/worked
    2. I manually inspected the various sections (trust levels, etc) between the DEV & SIT web.configs, they are identical
  3. Below is the section where I configure the CAPTCHA in my code. I assume it’s correct as this works on DEV

// 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

Herbert
Top achievements
Rank 1
 answered on 04 Jul 2014
2 answers
433 views
Hi,

I set maxlength of Numeric textbox to 16 as I want to limit the number of characters to be entered. And maxvalue as 9999999999999999  (16 characters).
But, when I entered 16 characters into it, it is reverting the number back to 9999999999999999. How can I save 16 entered numbers as is and restrict to revert back?

Thank you.
Viktor Tachev
Telerik team
 answered on 04 Jul 2014
1 answer
270 views
Hi I want to have CRUD operation in client mode.
When I add or Edit, I want to display data with custom add and edit template, like http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx
But I want use client code, so data will display and collect at client side.
Can somebody give me sample for that?, thank's

Regards,

Gunawan
Pavlina
Telerik team
 answered on 04 Jul 2014
1 answer
109 views
Hi,
    I am using bootstrap template in my web site and trying to use autocomplete box but their is problem occurs at the time of displaying popup list of autocompletebox.
 Please check the attachment and help me to solve this problem.

thank you.
Nencho
Telerik team
 answered on 04 Jul 2014
2 answers
103 views
If there a way to have the timepicker expanded on the page to save a click to expand the picker.

I suppose I'm looking for the same feature difference as there is between DatePicker & Calendar.

Andy

PS is there a problem with the search, it doesn't work if you just search the current forum section.
Andy Green
Top achievements
Rank 2
 answered on 04 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?