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.

GGC: Redraw Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

70517 Dec 13,2007 08:37 PM Dec 17,2007 04:15 AM Windows Forms 4
loading
Tags: Grouping
Patrick Cheng
Asked On December 13, 2007 08:37 PM

Hi,

I have a GGC and it seems that there is a weird behavior with the re-draw of the grid. When I scroll left and right, it seems that the grid will become messy and the data unreadable. I would then have the resize the window the GGC is in, the force a re-paint. The way around this now is to create a time which re-paints every x seconds. Is there a better way to handle this issue?


Administrator [Syncfusion]
Replied On December 14, 2007 05:09 AM

This is not expected behavior in our GridGroupingControl. It is probably best to track down the reason for this. Some things to do are:

Check the output window to see if any exceptions are being shown when you see this behavior.

Look through your code to see if you have any grid.BeginUpdate calls that are not paired with grid.EndUpdate calls. And also verify that there is no execuation path that can avoid the matching grid.EndUpdate. This can cause drawing problems.

Try commenting out grid events to see if some event code is causing this behavior.

If you can upload a sample showing this issue either here or in Direct Trac, we can try to spot the problem.


Patrick
Replied On December 16, 2007 08:30 PM

Hi Clay,

It seems that I have found the cause of the problem. Apparently when I set grid.TableControl.EnableDoubleBufferSurface()
it will cause the re-paint issue. However, now that I have commented it out, it seems that scrolling becomes a bit slower, not a whole lot, but you can see it is not smooth. Is there anything I can do to help smooth out the scroll?

Many thanks!


Patrick Cheng
Replied On December 17, 2007 01:04 AM

Hi Clay,

Commenting it out also causes a lot of flickering to happen.


Administrator [Syncfusion]
Replied On December 17, 2007 04:15 AM

In a simple form with a flat datasource, just calling this method does not cause a problem for me using the latest 6.1 library code.

Does your datasource have nested tables? If so, are you calling EnableDoubleBufferSurface() on the child TableControl as well as the parent TableControl?

Here is something to try to see if it avoids the problem when you call EnableDoubleBufferSurface(). After the scroll has completed, you could try calling grid.Refresh(). To try this, handle the TableControl.HScroll.Scrolled event.

//subscribe to the event somewhere
this.gridGroupingControl1.TableControl.HScrollBar.Scroll += new ScrollEventHandler(HScrollBar_Scroll);


//the event handler code
void HScrollBar_Scroll(object sender, ScrollEventArgs e)
{
if (e.Type == ScrollEventType.EndScroll)
{
gridGroupingControl1.Refresh();
}
}



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.

;