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

  • Home
  • SEARCH
  • 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 4080366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:55:15+00:00 2026-05-20T17:55:15+00:00

I have a GridView, in which the width of each column is dynamic and

  • 0

I have a GridView, in which the width of each column is dynamic and changes depending on the dataset. I need to get the width of each column for use in my PDF exporter, but the column/cells width is always ‘0’, presumably because I haven’t set the width property.

Is there a way around this?

  • 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-20T17:55:16+00:00Added an answer on May 20, 2026 at 5:55 pm

    I don’t know of a way to do this purely in the code behind, if someone else does I would love to hear about it.

    What does occur to me as one possible way to accomplish this would be to add a hidden field to the page and then use JavaScript to populate the hidden field with the rendered column widths. This is assuming that you are displaying a standard ASPX page and giving the users an option to export to PDF. Your export code can then use the value of the hidden field to build the PDF layout. Doing it this way would be a bit of a kludge but it should work.

    Hoping someone else has a better option…

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

Sidebar

Related Questions

I have a gridview with some imagebuttons, each of which kicks off a report
I have a GridView on a .aspx page with a hidden column which has
I have a GridView in which each row has a custom view. The grid
I have a grid view which contains some sequence numbers. Each column needs to
I have a GridView which may contain 10's and 100's of rows, on each
I have a gridview which has drop down boxes in each header for filtering.
I have a GridView which is programatically filled from the DB (not a SqlDataSource
I have a GridView which I am populating by calling a method to return
I have a GridView which is databound to an XML Datasource. For one of
Have a gridview control which will show X amount of rows. I want to

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.