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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scrolling w/o Flicker in Virtual Grids

Thread ID:

Created:

Platform:

Replies:

24144 Jan 28,2005 07:07 PM UTC WinForms 0
loading
Tags: GridControl
Michael Lenaghan
Asked On January 28, 2005 07:07 PM UTC

I''ve seen some other posts of people having problems with scrolling in virtual grids. I thought I''d post my solution to the problem in case it was useful to others. My virtual grid uses QueryCellInfo to set both text and styles. There''s logic to choose styles based on cell types/values; the styles have different BackColors. Furthermore, the "model" for the grid is optimized to only fetch data when everything is settled. The issue was that, when the "model" was invalid, it produced default values. The style selection logic kicked in--and what the user would see after, say, paging down, was a white cell turning gray and then white again. The gray was based on the temporary selection of a default value from an invalid model. My soltion was to call if (!m_DataEntryRefreshing) { m_DataEntryGrid.BeginUpdate( BeginUpdateOptions.None ); } in LeftColChanging/TopRowChanging, and then call try { RefreshDataEntryVisibleCells(); RefreshDataEntry(); } finally { if (!m_DataEntryRefreshing) { m_DataEntryGrid.EndUpdate( true ); } } in LeftCol/TopRowChanged. The try block protects against errors in my refresh code; the refresh code sets and clears the m_DataEntryRefreshing flag. The reason I check the flag is that under some circumstances the refresh code centers the currently selected column in the grid, thus causing a change (and call) to LeftCol. This took care of the last of my flicker problems.

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;