Problem with ExcelExporting

10 posts, 0 answers
  1. Nataly
    Nataly avatar
    6 posts
    Member since:
    Jul 2009

    Posted 29 Jul 2009 Link to this post

    Hello, telerik!

    I have some problem, connected with this grid. An event "ExcelExportCellFormatting" isn't raised when the grid is in process of exporting to excel.How can i call this event other way?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Jul 2009 Link to this post

    Hi,

    OnExcelExportCellFormatting event is raised when RadGrid is exported to Excel (before the resulting document is rendered on the client). I am not sure what is happening on your end. Can you confirm that you have added the event handler for the OnExcelExportCellFormatting event in the RadGrid.

    ASPX:
     
     <telerik:RadGrid ID="RadGrid1" Width="800px" runat="server" Skin="Default" AllowMultiRowEdit="true" DataSourceID="SqlDataSource1" 
    OnExcelExportCellFormatting="RadGrid1_ExcelExportCellFormatting"  > 


    Thanks
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nataly
    Nataly avatar
    6 posts
    Member since:
    Jul 2009

    Posted 30 Jul 2009 Link to this post

    Yes, I do it. And I fill my grid not through SqlDataSource, but in C# code in Page_Load. 

    RadGrid1.DataSource = GetSummaryContracts();
    RadGrid1.DataBind();

    There is a button on the page. 

    protected void Button1_Click(object sender, System.EventArgs e)
    {
         RadGrid1.MasterTableView.ExportToExcel();
    }
      

    I want to format a view of my grid in Excel through OnExcelExportCellFormatting. But this event isn't raised. I use RadControls_for_ASP.NET_2008_3_1105_source. I will be pleased any help 
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Jul 2009 Link to this post

    Hi,

    I am not sure what is happening on your end. I am using RadControls for asp.net AJAX(2009.1.311.20). Try upgrading to the latest version and see whether it  helps.
    Updating RadControls for ASP.NET to another version or license

    Thanks
    Shinu
  6. Nataly
    Nataly avatar
    6 posts
    Member since:
    Jul 2009

    Posted 31 Jul 2009 Link to this post

    Example

    Can you see my example, please. I have updated a version of telerik-controls, but unfortunatly the event ExcelExportCellFormatting will be not raised, if you click ImageButton1
  7. Nataly
    Nataly avatar
    6 posts
    Member since:
    Jul 2009

    Posted 31 Jul 2009 Link to this post

    Thank you!!! I'v already solved my problem!
  8. Jon Chan
    Jon Chan avatar
    1 posts
    Member since:
    Jul 2009

    Posted 31 Jul 2009 Link to this post

    Hi,

    I was wondering if you could let me know how you fixed your problem.  My event is not being raised either.  My telerik controls are updated, and it is also being called.

    Thanks.
  9. Nataly
    Nataly avatar
    6 posts
    Member since:
    Jul 2009

    Posted 31 Jul 2009 Link to this post

    Hello, I've added RadAjaxManager and it is working now. 
  10. Michael Pappas
    Michael Pappas avatar
    3 posts
    Member since:
    Sep 2009

    Posted 06 Jul 2010 Link to this post

    It seems that the ExcelExportCellFormatting event handler is only fired when the Excel Export format is set to GridExcelExportFormat.HTML.  ExcelMLdoes not cause the event to fire.
  11. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 06 Jul 2010 Link to this post

    Hello Michael,

    ExcelMLRowCreated and ExcelMLStylesCreated fire when using the ExcelML export. ExcelExportCellFormatting fires when the format is HTML Excel.

    For more information:
    Word/Excel export (HTML-based) help topic
    ExcelML export help topic

    Best regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017