Click here to monitor SSC

HOw to print the content of a Gridview?

Last post 12-02-2009, 4:26 AM by chandru7. 3 replies.
Sort Posts: Previous Next
  •  02-18-2009, 8:24 PM Post number 72063

    HOw to print the content of a Gridview?

    Dear all,

    I have a aspx webform which has a Gridview on it displaying information from database tables.

    How can I print the content of the Gridview, say, by pressing a button on the form?

    I don't want to use the file/print feature of the browser as I can't control the output data then.

    THanks

    Tony

  •  04-04-2009, 8:12 AM Post number 72751 in reply to post number 72063

    Re: HOw to print the content of a Gridview?

    Hi,

    Just put that Gridview in <div> element and use javascript to print that div content.

    That's it

     


    Navi's
  •  04-07-2009, 1:32 PM Post number 72769 in reply to post number 72063

    Re: HOw to print the content of a Gridview?

    You may also want to use media specific style sheets. With media specific style sheets, you can have the same page display differently depending on the display media. For example, you can have certain elements not be visible (display: none) when printed.

    Let me know if you would be interested in seeing an example or if this does not address the concerns that you have.

    Nick
  •  12-02-2009, 4:26 AM Post number 78385 in reply to post number 72063

    Re: HOw to print the content of a Gridview?

    Best,just export gridview values into pdf and print it,For exporting pdf you can find the article here
View as RSS news feed in XML