print gridView

G

Guest

My web app is using master pages, On the content page I'm using a GridView. I
need to print my GridView and I need to exclude the HyperLink columns. How
can I print my content page and exclude the first 3 rows in my Grid due to
they are links and I don't need to print the links out?
 
B

Bruno Alexandre

you need to create a new friendly-page to print...
in that new page you can them ommited the 3 rows that you need
 
G

Guest

how would i do that? Currently I have print page that is being used for all
my pages to print. But how can I elminate the rows I do not want from the
GridView?
 
B

Bruno Alexandre

put the query you do in a DataTable, them remove the rows you need using

DataTableObject.RemoveAt( rowNumber )

then bind the dataTable to your gridView

GridView.DataSource = DataTableObject
GridView.Bind()
 
G

Guest

I'm not passing anything in a querystring to print. I'm printing like this:

on the content page i have this:
<table id="printTable>
-- i show my gridview here
</table>
then i have an image for printing on the page
then on the printing page i have this:

function printpr(id)
{
if (opener && !window.opener.closed)
{

document.writeln(opener.document.getElementById('printTable').outerHTML);
}
else

}
and this shows my grid in a print view page then i print, so i'm not passing
anything to my print page other then the element name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top