Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
132 views
Hi there,

I'm using RadGrid and its ExportToExcel feature. I tried both approach of using the built-in button by setting OnBiffExporting="ExportList" and :
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
    ShowRefreshButton="true" />
 and create my own:
<telerik:RadButton ID="rbtIGTExportToExcel" Width="150px" Text="Export To Excel" OnClick="btnExcel_Click"
    runat="server" Icon-PrimaryIconUrl="~/images/icons/sys-excel.png" />

Both are calling similar methods:
  1. Built-in version:
protected void ExportList(object sender, EventArgs e)
{
    RadGridListAllUser.ExportSettings.IgnorePaging = true;
    RadGridListAllUser.ExportSettings.OpenInNewWindow = true;
    RadGridListAllUser.ExportSettings.FileName = string.Format("{0} User List Export {1}", (string)Session["StudyName"], DateTime.Now.ToShortDateString());
    RadGridListAllUser.MasterTableView.ExportToExcel();
}

2. Custom version:
protected void btnExcel_Click(object sender, EventArgs e)
{
    rgIGTSummaryGrid.ExportSettings.IgnorePaging = true;
    rgIGTSummaryGrid.ExportSettings.OpenInNewWindow = true;
    rgIGTSummaryGrid.ExportSettings.FileName = string.Format("{0} IGT Export {1}", (string)Session["StudyName"], DateTime.Now.ToShortDateString());
    rgIGTSummaryGrid.MasterTableView.ExportToExcel();
}


In both version the FileName property is set but only the custom version ends up with this name, the built-in one keeps spitting a  RadGridExport.xls. Plus, in the custom version, all forbidden characters such as : / & < > are automatically replaced by _ which doesn't happen with the built-in feature.

Is this a bug or am I doing something wrong ?

Cheers,
Princy
Top achievements
Rank 2
 answered on 20 Jun 2013
1 answer
101 views
Hi,

after upgrading to the Q2 2013, our itemtemplates in the grid gets bricked after doing an ajax call. The ajax call updates the grid. I have attached screenshots, which show the described behavior. The itemtemplate was running with the same implementation for the last year. 
Angel Petrov
Telerik team
 answered on 20 Jun 2013
3 answers
183 views
Hi guys ,,  am new with Telerik controls , and this is my first Thread on this Forum.

I have RadGrid control on my Webpart project (using Telerik for Web version 3.5) ,
 every thing is OK , I set the pager-Style mode to "Numeric" and the page size =20 .

the grid display by default 10 pages links like  (1,2,3,4,5,6,7,8,9,10) ,  and when click next It will get the next 10 page links.

I want to set the Grid to display more then 10 links at one time , like (1,2,3,4,5,6,7,8,9,,10,11,12.13,14,15) .
I googled for the property but unfortunately i did't get what i want .

Please Can any one guide me to the solution.
Thanks
Andrey
Telerik team
 answered on 20 Jun 2013
6 answers
865 views
Hello people.
i will like to know if thers's a way to make rows merge in the grid?

thanks in advance
Hector Hernandez
Top achievements
Rank 2
 answered on 20 Jun 2013
2 answers
112 views
Hi,
I have problem with sum column in telerik report
In attached my report with sum row and here my code to export this report to pdf:

        protected void Unnamed1_Click(object sender, EventArgs e) {
            // export to pdf
            if (TreeViewFilter.SelectedNodes.Count > 0) {
                int reportId = Convert.ToInt32(TreeViewFilter.SelectedValue);
                string fileName = string.Format("Report{0}.pdf", reportId);
                string fileNameGuid = string.Format("Report{0}{1}.pdf", reportId, Guid.NewGuid());
                string name = string.Format("{0}\\{1}", ConfigurationManager.AppSettings["ExportFolderPath"], fileName);
                if (File.Exists(name)) {
                    //Set the appropriate ContentType.
                    Response.ClearContent();
                    Response.ContentType = "Application/pdf";
                    Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", fileNameGuid));
                    //Write the file directly to the HTTP content output stream.
                    Response.WriteFile(name);
                    Response.End();
                }
            }
        }

The problem is that i can see sum row in report preview but it does not appear in the exported file. Where the problem? Thanks.
Kvasov Dmitry
Top achievements
Rank 1
 answered on 20 Jun 2013
3 answers
177 views

Hi, I am trying to loop through all my panelsbars in JS but it does not work, when I try to getelementbyid then i can find the panel bat but not like this:
any ideas?

$('div[id*="P010101"]').each(function () {
    alert('a');
});

Thank you.
Gabriel
Top achievements
Rank 1
 answered on 19 Jun 2013
4 answers
342 views
Good day, team

It's possible to upload big file using Firefox & Chrome, everything is ok, but there is a problem with uploading a big document via IE8-9: file is getting truncated to 2048 Kbs. 

HttpPostedFile always has ContentLength ~2 Mbs in case of Internet Explorer and big documents.
ContentType is 'application/octet-stream' despite of different real content type (Firefox & Chrome maintain proper ContentType).

Additional details:
In case of IE we can see filled Request.Form["metadata"] with details: number of chunks, total file size, e.t.c
In case of Firefox/Chrome this metadata is null.
I suppose only the first chunk has loaded into file stream in case of IE.

I would like to ask about giving me a clue how to resolve this problem.





Plamen
Telerik team
 answered on 19 Jun 2013
7 answers
498 views
Hello I've the following problem:

I've a page, Default.aspx, which contains a placeholder for a dynamically loaded UserControl (#UC1). UC1 cotains a fixed programmed UserControl UC1A which contains a RadGrid with a LinkButton defined in the CommandItemTemplate. When clicking on the linkbutton I expect the OnRequestStarted will be called but the alert message in the script function never appears. It seems the postback is being cancelled.

So masterpage:
...
<head>
  ..
  
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script type="text/javascript">
        function onRequestStart(sender, args) {
  
            alert(args.get_eventTarget());
  
            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
            args.get_eventTarget().indexOf("ExportToCsvButton") >= 0 ||
            args.get_eventTarget().indexOf("ExportToPdfButton") >= 0) {
            args.set_enableAjax(false);
            }
        }
      </script>
    </telerik:RadCodeBlock>
  
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
      <ClientEvents OnRequestStart="onRequestStart" />
    </telerik:RadAjaxManager>
   ....
    </form>
   ....
</body>

UC1A contains:

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgRelation">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rgRelation" />
          </UpdatedControls>
        </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
  
asp:Label ID="lblUCCRMTitle" runat="server" Text="Relation" CssClass="styleTitle"></asp:Label>
<asp:Panel ID="pnlRelation" runat="server" Width="100%" ScrollBars="auto">
<telerik:RadGrid ID="rgRelation" 
                 runat="server" 
                 AllowFilteringByColumn="True" 
                 AllowPaging="True" AllowSorting="True" 
                 AutoGenerateColumns="False" 
                 CellSpacing="0" 
                 DataSourceID="sqlDSRGRelation" 
                 GridLines="None" 
                 PageSize="20" 
                 Skin="Windows7"
                 OnItemCommand="rgRelation_ItemCommand" 
        onitemcreated="rgRelation_ItemCreated">
<ExportSettings ExportOnlyData="true" Excel-Format="ExcelML" >
  <Excel Format="ExcelML"></Excel>
</ExportSettings>
  
    <ClientSettings><Resizing ClipCellContentOnResize="false"/>
                                      
    </ClientSettings>
  
<MasterTableView DataKeyNames="RelationID" DataSourceID="sqlDSRGRelation" CommandItemDisplay="Bottom" InsertItemDisplay="Bottom">
            <CommandItemTemplate>
<div id="CommandItemTemplate">
<div id="CommandItemTemplateLeft">
    <asp:LinkButton ID="lbnAddRecord" runat="server" CssClass="CommandItemLinkButton" CommandName="InitInsert"></asp:LinkButton>
    <span class="CommandItemTemplateDivider">|</span>
    <asp:LinkButton ID="lbnExportToExcel" runat="server" CssClass="CommandItemLinkButton" CommandName="ExportToExcel"></asp:LinkButton>
    <asp:LinkButton ID="lbnExportToPDF" runat="server" CssClass="CommandItemLinkButton" CommandName="ExportToPdf"></asp:LinkButton>
    <asp:LinkButton ID="lbnExportToCSV" runat="server" CssClass="CommandItemLinkButton" CommandName="ExportToCsv"></asp:LinkButton>
    <span class="CommandItemTemplateDivider">|</span>
    <asp:LinkButton ID="lbnRefresh" runat="server" CssClass="CommandItemLinkButton" CommandName="RebindGrid"></asp:LinkButton>
    <span class="CommandItemTemplateDivider">|</span>
    <asp:LinkButton ID="lbnSaveGridLayout" runat="server" CssClass="CommandItemLinkButton" CommandName="SaveGridLayout"></asp:LinkButton>
</div>
</div>
</CommandItemTemplate>
<CommandItemSettings    ShowExportToPdfButton="true"
                        ExportToPdfText="Export to PDF" 
                        ShowExportToExcelButton="true"
                        ExportToExcelText="Export to Excel" 
                        ShowExportToCsvButton="true"
                        ExportToCsvText="Export to CSV" >
</CommandItemSettings>
  
..........


Qais
Top achievements
Rank 1
 answered on 19 Jun 2013
2 answers
132 views
Hello;

As an end user when visiting the web page the scrolling vertically of the page is not smooth. It flickers and jumps back.
When I open Fiddler or Firebug and look at the HTTP requests there is are constant  posts from the RadScriptManager about every second. I think this causes the scrolling issue.
I think the cause is a timer_tick for a clock that is causing the scrolling issue.
What are some ideas to resolve this issue and allow scrolling to work normally?

Thank you;
msigman
Top achievements
Rank 2
 answered on 19 Jun 2013
2 answers
106 views
Good afternoon,

When setting up the radEditor I can browse and upload html documents in the template manager and select them showing a preview on the right side. When I click the 'Insert' button however nothing happens. There are no javascript errors thrown. I have AllowSpecialTags="True" turned on. I pulled the control onto a blank aspx page and have the same issue. The Image Manager works just fine and insert places the image in the HTML content area. Anyone know why it would function this way?

Thanks,

David
David
Top achievements
Rank 1
 answered on 19 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?