Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7570871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:31:36+00:00 2026-05-30T15:31:36+00:00

I have a page with a data grid and when I print it i

  • 0

I have a page with a data grid and when I print it i want only the data grid to be printed. On clicking print all other elements in the page (left nav, header, footer etc) are removed and only the necessary part(which is in a div called printdiv) is displayed. But unfortunately I can’t get it to display the background i want. Please Help!!!
I need the background to be white, but instead it is grey, which is the background for the rest of the site, Is there a way I can change the background for the form alone?

This is the javascript I’m using

            <div id="printDiv" >

                <div id="maincontent-right-wrapper">
                    <div class="page-heading">
                        <spring:message
                            code="rmp.store_performance_yearly.page_header.store_performance_yearly" />
                    </div>

                    <!--shop starts-->
                    <div class="shop-promoter-wrapper">
                        <div class="shop-promoter-inner">

                            <ul>
                                <li><spring:message
                                        code="rmp.store_performance_yearly.label.store" /></li>
                                <li>&nbsp;</li>
                                <li><form:select path="storeid">
                                        <form:options items="${StoreList}" itemValue="storeId"
                                            itemLabel="storeName" />
                                    </form:select></li>
                                <li><img src="../static/images/spacer.gif" width="26"
                                    height="1" /></li>

                                <li><spring:message
                                        code="rmp.store_performance_yearly.label.year" /></li>
                                <li>&nbsp;</li>
                                <li><form:select path="year">
                                        <form:options items="${YearList}" />
                                    </form:select></li>

                                <li>&nbsp;</li>
                                <li><a href="#" onclick="callGo(1)">
                                        <div class="button-wrapper">
                                            <div class="button-left">&nbsp;</div>
                                            <div class="button-middle">
                                                <spring:message
                                                    code="rmp.store_performance_yearly.button.go" />
                                            </div>
                                            <div class="button-right">&nbsp;</div>
                                        </div>
                                </a></li>

                            </ul>

                        </div>
                    </div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:31:37+00:00Added an answer on May 30, 2026 at 3:31 pm

    Code is worth a thousand words, but FYI browsers usually don’t print backgrounds, and it’s a user-controlled setting whether they do. So your best bet is to not a use a background (there’s a reason browsers don’t print them, the results tend not to be very good) or make whatever background you want to have an actual element on the page, behind the div (lower in the Z order).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which has a long grid/table data...I am testing it on
I have a .Net web forms page, that has a data grid on it
I have an asp.net-mvc site. I have a page with a grid of data
Assume I have a page with a data grid bound to a data source.
I have a JSP page retrieving data and when single or double quotes are
I use ADO.NET Entity-Framework, I have a page that is data-bound to an entity
I have a page where I submit some data, and return to the original
I have a page that needs to combine data from four different webrequests into
I have a page where a user can import data to the site. either
I have a page with two Listviews (with two different data sources). I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.