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.

Smart Painting

Thread ID:

Created:

Updated:

Platform:

Replies:

26530 Mar 24,2005 10:37 AM Mar 24,2005 03:55 PM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 24, 2005 10:37 AM

Hi Clay, Want to know whether this is possible in GDBG for example i have the following rows in datatable Symbol Ask Bid MSFT 1 2 GE 3 4 the updates are happening to the underlying datatable, so lets say the bid price of MSFT is changed, this will trigger row list changed event and the GDBG will fire a paint operation for the entire row.. so it means prepareviewstyleinfo event will get triggered for all the columns of MSFT.. but if you look at the data only bid price got changes rest of the columns data remains unchanged.. so ideally there is no need to paint Symbol and Ask columns for MSFT as its underlying data is not changed and is already visible to the users but the only trick is if users brings another window in foreground invalidating the background window then when users again re-enters into the deactivated window then paint operation should be invoked for all 3 columns (MSFT,Ask and Bid).. this would be a huge optimization as it would save considerable amount of cpu cycles in a sceanario where the no. of columns are large in numbers. Do you think it is possible ? Also i have old snippet whereby i am bypassing the internal GDBG overheads by handling the paint operation inside my own specialized class.. this.SupportsPrepareViewStyleInfo=false; this.DrawCell +=new GridDrawCellEventHandler(ExtSyncGDBG_DrawCell); Regards Yogi

Administrator [Syncfusion]
Replied On March 24, 2005 11:54 AM

Yogi, just wanted to check that you got the sample we sent in Direct Trac incident 16800, correct? As far as painting only some of the cells in a row instead of the whole row, if you have access to the code that changes the grid (or changes the datasource), here is something you could try. Before the change, call this.gridDataBoundGrid1.BeginUpdate(Syncfusion.Windows.Forms.BeginUpdateOptions.None); The after the change, call this.gridDataBoundGrid1.EndUpdate(false); Then you could call grid.InvalidateRange to invalidate the single cell that changed. I think this would avoid painting the whole row. If you submit another Direct Trac incident, we can forward you a different sample (also requires new DLLS as the other sample did) that invaldiates things cell by cell though it does use a virtual GridControl bound to a datatable to do this, and not a GridDataBoundGrid.

Administrator [Syncfusion]
Replied On March 24, 2005 03:55 PM

thx Clay.. pls check the incident report i have posted my observation with sample project that uses the real typed dataset Regards Yogi >Yogi, just wanted to check that you got the sample we sent in Direct Trac incident 16800, correct? > >As far as painting only some of the cells in a row instead of the whole row, if you have access to the code that changes the grid (or changes the datasource), here is something you could try. > >Before the change, call > >this.gridDataBoundGrid1.BeginUpdate(Syncfusion.Windows.Forms.BeginUpdateOptions.None); > >The after the change, call > >this.gridDataBoundGrid1.EndUpdate(false); > > >Then you could call grid.InvalidateRange to invalidate the single cell that changed. I think this would avoid painting the whole row. > >If you submit another Direct Trac incident, we can forward you a different sample (also requires new DLLS as the other sample did) that invaldiates things cell by cell though it does use a virtual GridControl bound to a datatable to do this, and not a GridDataBoundGrid.

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.

;