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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

refreshing after collapse in tree grid

Thread ID:





7517 Sep 29,2003 05:36 PM UTC Sep 29,2003 06:44 PM UTC WinForms 1
Tags: GridControl
Terry Foster
Asked On September 29, 2003 05:36 PM UTC

Hello, I've created a virtual tree grid modeled after the sample you've provided. When the user clicks to collapse a branch, I hide all rows within the branch. I would like to avoid refreshing the entire table after doing this, but refreshing only the effected rows leaves residual drawing on the background where the last few rows used to be visible. How can refresh just the effected rows and the background? Or can you suggest a better way to accomplish this task? I HAVE noticed that this is a rather sluggish operation. Any ideas on how I might optimize this? Thanks, Terry

Administrator [Syncfusion]
Replied On September 29, 2003 06:44 PM UTC

To determine the area below the last visible row use the RectangleBottomOfRow method. E.g. Rectangle r; if (IsRowVisible(RowCount)) { r = RectangleBottomOfRow(RowCount); Invalidate(r); } BTW - How do you hide the rows? If you hide them just by turning flags in an external data source and you have a underlying row to grid row mapping, then you can also force the grid to refresh the affected area with gridModel.Rows.OnRangeInserting before resetting the flag when expanding rows and gridModel.Rows.OnRangeRemoved method calls after resetting the flag when hiding rows. Stefan


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon