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;
grid.Properties.PrintRowHeader = false;
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.
ADAdministrator 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.