Printing grid headers on every page

Thread is closed for posting
3 posts, 0 answers
  1. Hristo Deshev
    Hristo Deshev avatar
    16 posts
    Member since:
    May 2004

    Posted 26 Feb 2007 Link to this post


    RadGrid version

    RadGrid Q4 2007 or later

    .NET version


    Visual Studio version


    programming language

    C#, CSS

    browser support

    all browsers supported by RadGrid


    Printing a web page with a RadGrid control will usually make the grid span across several [paper] pages. Reading them might be hard and we may want to have the column headers available on each page. To achieve that we have to define a CSS setting that will be applied for the print media only. It will change the grid table's thead and tbody element display settings:

    <style type="text/css">  
    @media print  

    The attached files contain a project with a single page bound to the Northwind sample products and a PDF file containing the printed pages.
  2. lyners
    lyners avatar
    23 posts
    Member since:
    Jun 2012

    Posted 10 Mar 2008 Link to this post

    Hi Hristo,
    I tried your CSS in my code, but my headers will not repeat on the next page. The only thing that happened, was that the Header stopped wrapping on the first page of print. The only difference is I am using VB, and you are using C#. Otherwise everthing else is the same.

    I downloaded your example and it does work.

    So I am confused why this is happening.

    Any ideas on where I could look to find some good CSS advise to possibly get this working?

  3. Sebastian
    Sebastian avatar
    9934 posts

    Posted 11 Mar 2008 Link to this post

    Hello lyners,

    If you applied the @media print style definition discussed in this entry the grid headers should be printed on every page regardless of the programming language you use. Can you please double-check that the style definitions are propagated as expected? You may also compare both versions of the project and outline the differences between them. This can identify the problem to address it accurately.

    To convert the C# code from the example, I suggest you use our free online converter:
    Best regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top