We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

hiding row headers in GridDataBoundGrid

I''m using a version of the GridPrintToFitDocument to fit a GridDataBoundGrid onto a single width page (multiple pages long). Everything works great but now I want to remove the row headers to have more real estate on the page to work with. The documentation/samples/forum questions I''ve seen all seem to relate only to GridControl and not GridDataBoundGrid. I''ve tried: grid.Model.Properties.PrintRowHeader = false; and grid.Properties.PrintRowHeader = false; and setting the grid_QueryColWidth delegate and setting the 0 indexed colum to a width of 0. All of these work in the GridControl but don''t seem to have any affect on the GridDataBoundGrid control. I''ve attached the class that I''ve been modifying. -Tyler GridPrintToFitDocument_6614.zip

2 Replies

AD Administrator Syncfusion Team April 25, 2005 08:33 PM

One observation is that _grid.PrintingMode is not really being used here as you are actually drawing a bitmap and then pritnting the bitmap. So, instead of trying to use the PrintingMode together with QueryColWidth, add your own flag that you test in the QueryColWidth handler. Then set this flag at the top of your OnPrintPage override, and turn it off at the bottom. Then hopefully, this flag will work in QueryColWidth to allow teh header width to be set to zero.


TY Tyler April 26, 2005 08:12 AM

that makes sense and worked. thanks alot.

Loader.
Live Chat Icon For mobile
Up arrow icon