logo
down
shadow

Export telerik RadGrid to PDF


Export telerik RadGrid to PDF

By : Shangbin Dong
Date : November 22 2020, 04:01 AM
it fixes the issue I have a Telerik RadGrid with NestedViewTemplate, when exporting it to PDF, it results in a corrupted file. , I got it!
There is an exception log says:
code :


Share : facebook icon twitter icon
RadGrid telerik problems with export to excel

RadGrid telerik problems with export to excel


By : Mʀ Avi
Date : March 29 2020, 07:55 AM
may help you . It is known issue caused by the AJAX (basically the page needs to return stream rather than XttpReuest used for AJAX) therefore tha AJAX need to be canceled on this post-back. You can find more info here and download few sample projects that show various way of exporting radgrid.
PS. The "ready solution" is to add this to your JS code
code :
<script type="text/javascript">
            function mngRequestStarted(ajaxManager, eventArgs)
           {
              if(eventArgs.EventTarget == "mngBtnExcel" || eventArgs.EventTarget == "mngBtnWord")
             {
                eventArgs.EnableAjax = false;
             }
           }
            function pnlRequestStarted(ajaxPanel, eventArgs)
           {
              if(eventArgs.EventTarget == "pnlBtnExcel" || eventArgs.EventTarget == "pnlBtnWord")
             {
                eventArgs.EnableAjax = false;
             }
           }
            function gridRequestStart(grid, eventArgs)
           {
              if((eventArgs.EventTarget.indexOf("gridBtnExcel") != -1) || (eventArgs.EventTarget.indexOf("gridBtnWord") != -1))
             {
                eventArgs.EnableAjax = false;
             }
           }
</script>
Telerik Radgrid export file name

Telerik Radgrid export file name


By : abi saad dimyati
Date : March 29 2020, 07:55 AM
it helps some times Source: Grid / MS Excel/MS Word/CSV
code :
protected void Radgrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.ExportToPdfCommandName)
    {
        Radgrid1.ExportSettings.FileName = "yourfilename";
    }
    if (e.CommandName == RadGrid.ExportToExcelCommandName)
    {
        Radgrid1.ExportSettings.FileName = "yourfilename";
    }
    if (e.CommandName == RadGrid.ExportToWordCommandName)
    {
        Radgrid1.ExportSettings.FileName = "yourfilename";
    }
}
telerik radgrid .net export button issue on chrome

telerik radgrid .net export button issue on chrome


By : doninuel
Date : March 29 2020, 07:55 AM
hope this fix your issue No setting adjustments needed, because it's already been fixed and is in the next stable release for chrome:
Issue 152911: CSV files open as text not downloading
Export Telerik RadGrid with EditMode lines

Export Telerik RadGrid with EditMode lines


By : youngway
Date : March 29 2020, 07:55 AM
will be helpful for those in need When you export Set the Templatecolumn values to the text property of Template column and then give ExportOnlyData="true";
This will work for Template columns also now.
code :
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
 if ((isExport) && (e.Item is GridDataItem))
 {
   GridDataItem item = e.Item as GridDataItem;
    item["DataInicioAtividade"].Text = ((RadDatePicker)item["DataInicioAtividade"].FindControl("data_inicio")).SelectedDate.ToString();               
 }
}
Telerik RadGrid export to excel gives paper format Letter and I need A4

Telerik RadGrid export to excel gives paper format Letter and I need A4


By : Andreea
Date : March 29 2020, 07:55 AM
Any of those help There is a configuration option to handle this export formatting when you are using ExcelML export.
Configure the ExportSettings for your AJAX Grid similar to the following:
code :
<ExportSettings ExportOnlyData="true" OpenInNewWindow="true" Excel-Format="ExcelML" />
protected void grid_ExcelMLWorkBookCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExcelMLWorkBookCreatedEventArgs e)
{
    e.WorkBook.Worksheets[0].WorksheetOptions.Print.PaperSize = System.Drawing.Printing.PaperKind.A4;
}
Related Posts Related Posts :
  • Clarification of IL generated code referenced to strings
  • EntityFrameworkCore.SQLLite and UWP Not behaving as expected
  • WPF MediaElement: Video opened twice
  • Temporary excel file with Interop library
  • Insert \u2265 into a C# string
  • Constant Enemy Damage to Player - Unity 2019.1 Beta
  • Is there a way to scan for viruses when downloading an attachment using EWS?
  • How to generify a method when T can be multiple new () Types?
  • Reading binary file data into List of Structs
  • Updating Status Strip on Form from BackgroundWorker
  • Visual Studio using GIT repository Publishing with API and Website in one Solution
  • Return Standard Deviation of column values with other column value condition LINQ
  • Grab a count of different values in object
  • c# File used by who?
  • How to parse string into an array using set number of characters in C#
  • How to sent list using CommandParameter
  • Problem with referencing ResourceDictionaries, and Styling across multiple assemblies
  • StackExchange Redis - high CPU usage on WriteAllQueues
  • Not typing the full variable name but partial name is represented by another string value
  • Linq to Entities Selecting Data with Max Date?
  • How to extract data using Ical.Net?
  • C# program crashes because listbox items change
  • Kicking a user in Discord.Net
  • C# Linq Find duplicates with multiple group by
  • How to call control on a Panel that is inside usercontrol
  • c# ReadAsJsonAsync in framework 4.5
  • Inner join two table variables and return an output cursor from an anonymous plsql block in a c# application
  • Notify consumers when all tasks have completed without blocking the thread
  • Replace "\\" with "\" in a path
  • CSS Not formatting inside repeater
  • CheckedListBox filter with a TextBox
  • How to not evaluate the third part of a ternary operator unless necessary
  • How to avoid going into cache block in c# and return to loop iteration?
  • How do I add just one element to an array when I call a method c#
  • Image.RotateFlip doesn't seem to rotate the Bitmap
  • swagger add document and operation for a generic controller
  • Avoid a random selection of the same point to imitate "human-like" behavior
  • Howto use PostgreSQL table names without double quotes in C# and Npgsql
  • .NET Core Entity Framework InvalidOperationException
  • Database Context save if valid
  • How do I flatten an array of arrays?
  • Serialize Property as Xml Attribute in new Element
  • How to make a flash-animation with a row of pictureboxes?
  • Add ClientId to the "Authorized API Clients"
  • Sending data between 2 forms
  • How do you get POSTed value from dynamically populated dropdownlist without the use of UpdatePanel?
  • C# Inconsistent accessibility: return type is less accessible than method
  • MVC Razor how to get option value from form and set viewmodel property to selected value
  • Automapper error after updating a record with POCO classes, Unity and EF6
  • Xamarin Forms Change NavBar background image on Specific pages
  • No service while customize a new User Context Identity
  • How to recognize element in which item in the gridview
  • Loading DataGridView only once based on listbox item selected
  • WCF Service not hitting from postman over https
  • Why won't C# decimal ToString request culture AND currency?
  • Using constant string in all include pages
  • Write Roslyn analyzer by Rider
  • What is the difference between a dSYM folder and an mSYM folder?
  • replace inheritance with generic extension method
  • C# XAML binding
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org