Print RadGrid contents

Thread is closed for posting
2 posts, 1 answers
  1. Answer
    Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 04 Aug 2009 Link to this post


    RadControls version RadControls for ASP.NET AJAX/ RadGrid for ASP.NET
    .NET version NET 2.0 and later
    Visual Studio version 2005, 2008 and later
    programming language C#/VB (no code-behind)
    browser support

    all browsers supported by RadControls

    This code-library demonstrates how to print the whole RadGrid/RadCalendar excluding the surrounding controls/elements. The output is generated in a new window (the resources are requested manually) and then printed via the standard window.print method.
    function PrintRadGrid()
        var previewWnd ='about:blank', '', '', false);
        var sh = '<%= ClientScript.GetWebResourceUrl(radGrid1.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",radGrid1.Skin)) %>';
        var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
        var htmlcontent = styleStr + "<body>" + $find('<%= radGrid1.ClientID %>').get_element().outerHTML + "</body></html>";;

    UPDATE (2012/07/16):
    We have uploaded a modified version of the example that works properly with a separate Skins assembly. Please visit the following link for more information about the differences between the old approach and the new one.
  2. Daniel
    Daniel avatar
    4933 posts

    Posted 25 Mar 2010 Link to this post


    We just updated the code-library projects. Please submit a formal support ticket if you have any questions or suggestions about this code-library project.

    Best regards,
    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