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.
Unfortunately, activation email could not send to your email. Please try again.

Suspend screen update

Thread ID:

Created:

Updated:

Platform:

Replies:

98578 Mar 9,2011 11:14 AM Mar 17,2011 06:39 AM Windows Forms 3
loading
Tags: GridControl
Qingde Shi
Asked On March 9, 2011 11:14 AM

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


Jisha Joy [Syncfusion]
Replied On March 10, 2011 04:49 AM

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


Qingde Shi
Replied On March 11, 2011 11:21 PM

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


Jisha Joy [Syncfusion]
Replied On March 17, 2011 06:39 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;