Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Remove Gridview Column for printer output via css print media cssclass declaration

Posted on 2006-05-30
1
Medium Priority
?
544 Views
Last Modified: 2010-07-27
I want to have a seamless printing process on my page where I use css to remove elements via the display:none; property.  I'm fine with doing that on menus and navigational / block level elements, but I'm not sure how to attach that print style to a column in a gridview.   For instance, I have a gridview with these columns.

Visit Time - Patient Name - Room # - DoctorName - ModifyAppointment

I want to remove the ModifyAppointment Column via a class or css so that I don't have to make a print version to remove it from printer output.  

I'm assinging middle point value to the question since it seems to be just a question of where to attach the cssclass property & looks relatively simple.
0
Comment
Question by:vort3xxx
1 Comment
 
LVL 22

Accepted Solution

by:
Jason Scolaro earned 600 total points
ID: 16792476
Yeah, should be pretty simple, you'll just need to attach your style, let's call it "noPrint", in the HeaderStyle and ItemStyle CssClass property for the specific columns you want hidden.  It should look something like:

<asp:BoundField HeaderText="ModifyAppointment" DataField="ModifyAppointment" ItemStyle-CssClass="noPrint" HeaderStyle-CssClass="noPrint" />

Good luck!
-- Jason
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question