Hi, I am wondering if it is possible to achieve the following with gridcontrol. I would like to change grid column width, row height, font etc during printing, when printing finished, restore original values, but during printing, I do not wish the changes affect the grid on screen.
Thanks,
Q
JJ
Jisha Joy
Syncfusion Team
March 10, 2011 09:49 AM UTC
Hi,
Yes. You can do this. You can save the original setting before printing and modify the settings and can took the print. Then restore the setings to the previous value after printing.
You can sandwitch the code inside the BegineUpdate and EndUpdate call so that painting will be suspended while these settings changes.
Regards,
Jisha
QS
Qingde Shi
March 12, 2011 04:21 AM UTC
Thanks. That did the trick for most part, except that the grid automatically scrolled to the end after EndUpdate is called. Is there any way to avoid that?
Thanks,
Q
JJ
Jisha Joy
Syncfusion Team
March 17, 2011 10:39 AM UTC
Hi,
You can save vertical scrollbar position before updating the grid and reset it after updation. Please refer to the code,
//saving it
int vPos = this.gridGroupingControl1.TableControl.GetCurrentVScrollPixelPos();
//resetting it
this.gridGroupingControl1.TableControl.SetCurrentVScrollPixelPos(vPos);
Regards,
Jisha