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

gridPrintToFit

I have a gridDataBoundGrid within a tab page and I''m using the gridPrintToFit example as a guide to print the grid onto a single page. The printing seems to work, but when I return to the application the grid''s visible size seems to be locked (if I resize the window the visible portion of the grid doesn''t change - white borders surround the existing viewable grid. This seems to be a result of setting/resetting the gridbounds. Rectangle saveGridRect = this._grid.GridBounds; this._grid.GridBounds = new Rectangle(0, 0, gridWidth, gridHeight); this._grid.DrawGrid(g); this._grid.GridBounds = saveGridRect; If I comment out setting/resetting the gridbounds i don''t run into the resizing problem in the application (but, of course the grid doesn''t print). It seems that once I reset the gridBounds, it is locked at that size and no longer will grow/shrink as its parent window grows/shrinks. any ideas how I can fix this? thanks, Tyler

2 Replies

Administrator November 11, 2004 03:09 PM UTC

Instead of this._grid.GridBounds = saveGridRect; try this._grid.ResetGridBounds();

TK Tyler Kohn November 11, 2004 03:45 PM UTC

perfect, thanks!
Loader.
Live Chat Icon For mobile
Up arrow icon