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
close icon

Grid not refreshing properly after changing GridBounds while printing

Hi, I am using 1.6.1.8 grid control. I am changing the GridBounds in my GridPrintDocument while printing a page. After that grid is no longer resizing properly. Problem Reproduction steps: 1. In PrintToFit sample anchor grid on 4 sides and run it. 2. Resize the form so that you can see F-col and 16-Row. Grid columns/rows are completely filled in the grid area. 3. Click on print preview. It shows the print preview properly. 4. Now Resize the form. After F col and below row 16 there is white space. Grid no longer resizing properly. Can you look into this and let me know how to solve this problem. thanks, - Reddy

5 Replies

AD Administrator Syncfusion Team November 20, 2003 08:20 PM UTC

Instead of this.gridControl1.GridBounds = saveGridRect; call this.gridControl1.ResetGridBounds Then it should resize fine again. Stefan


M. M.F.K. May 10, 2004 09:05 AM UTC

I had the same problems and tried it but didnt have any effect .... :( >Instead of > >this.gridControl1.GridBounds = saveGridRect; > >call > >this.gridControl1.ResetGridBounds > >Then it should resize fine again. > >Stefan


AD Administrator Syncfusion Team May 10, 2004 01:09 PM UTC

Can you post a sample showing the problem?


M. M.F.K. May 11, 2004 01:42 PM UTC

Ok. It worked fine ... I was making some mistake ... thanks! >Can you post a sample showing the problem?


DA Dan August 11, 2004 08:38 PM UTC

Just FYI for anyone else reading this - I tried the fix below with my grid control 1.6.1.8 and it didn''t fix the problem either. On a guess, I ended up changing this._grid.GridBounds = saveGridRect; to the same thing mentioned: this._grid.ResetGridBounds(); ...so this is in the OnPrintPage handler as well as the click handler. Now the resizing back on the form works properly. >Instead of > >this.gridControl1.GridBounds = saveGridRect; > >call > >this.gridControl1.ResetGridBounds > >Then it should resize fine again. > >Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon