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.
Syncfusion Feedback

hide large number of rows, performance

Thread ID:

Created:

Updated:

Platform:

Replies:

36499 Nov 1,2005 11:16 AM Jan 10,2013 07:23 AM Windows Forms 10
loading
Tags: GridControl
Giancarlo Aguilera
Asked On November 1, 2005 11:16 AM

Hello All! I''m facing an issue trying to hide a large number of rows in a gridcontrol (3.3.0.11), I''m talking about at least a 1000 rows. I''m following the beginupdate/endupdate pattern; however, it takes a very long time. I''ve used both hiderows and setrowhidden. Any suggestions or is this an issue? Many thanks GA

Administrator [Syncfusion]
Replied On November 1, 2005 01:55 PM

If you need to hide large numbers of rows, then doing it dynamically at runtime is the more efficient. One way you can do this is to handle the grid.model.QueryRowHeight event. There, if e.index points to a row you want hidden, set e.Size = 0 and e.handled = true.

Leow Kah Man
Replied On July 25, 2006 05:31 AM

Why is HideRows so slow?

The grid turns to blank, in the process.
Long enough to be noticeable.

Administrator [Syncfusion]
Replied On July 25, 2006 06:32 AM

Hi Leow,

The Rows.Hidden is actually a dictionary. When you hide a row, an entry is created in the dictionary, and when you make a row visible, this entry is removed from the dictionary. When you call Hidden.SetRange, the grid will only allocate storage for the entries that you specify. This means that if you have 5,000,000, and hide every other one with this technique, then there will be 2.5M entries. However, in such a situation, you could implement such a grid virtually using QueryRowHeight with no memory allocationn. I guess my commnet was to suggest if you use a virtual grid, special knowledge of what you are trying to hide may allow you to do something more economical than the standard implementation that has to work for any case.

Another consideration for the short term is that grids with a large number of hidden rows can have poor scrolling performannce. If you manage your own dictionary, you can actually avoid this scrolling performance penalty by treating all rows as if they were contiguous no matter where they are in your external data source. This would mean that you would have row map allocated, but it would enhanced scrolling performance for the time being.

Thanks,
Haneef

Leow Kah Man
Replied On July 26, 2006 08:31 PM

If the rowheight is 0, for rowindex 2,3,4.
If I am now at 5, and trying to use the arrow keys to move up to 1, will i have to press 4 times?

Leow Kah Man
Replied On July 27, 2006 01:11 AM

I created a small sample to test and find that it works beautifully.

Thank you.

Administrator [Syncfusion]
Replied On July 27, 2006 01:14 AM

Hi Leow,

You will be able to navigate to the Previous/next row in the grid as usual, even though the rows in between may be hidden. This should be fine.

Thanks,
Rajagopal

Bryan Roberts
Replied On January 8, 2013 04:52 PM

I am having a similar issue, but when I change the height to 0 it actually takes longer then HideRows() with a large number of rows (greater than 30k). Any suggestions?

Thanks in advance,
Bryan

Arun Kumar V [Syncfusion]
Replied On January 9, 2013 12:36 AM

Hi Bryan,

Thanks for your interest in Syncfusion products.

Query:

Performance Issue : HideRows() with a large number of rows.

The problem is that the you may have used the implementation of HiddenRows.SetRanges(). It will visit every row  in the range and set all style property . This will take time for large number of rows.

To improve the performance by using the .RowHeights.SetRange and ResetRanges method.

<code>

grid.RowHeights.SetRange(0, INITIAL_ROW_COUNT,ihidden_row,true);

grid.RowHeights.ResetRange(0, INITIAL_ROW_COUNT);

</code>

Please let me know if you have any other concerns.

Regards,

Arun


Bryan Roberts
Replied On January 9, 2013 01:42 PM

Do you make the reset range right after the SetHeights call? Also what is the third variable being passed in SetHeights()?

-Bryan

Arun Kumar V [Syncfusion]
Replied On January 10, 2013 07:23 AM

Hi Bryan,

Thanks for the update.

Query:

Explanation regarding third variable being passed in SetHeights()?

The third argument variable will get the sizes to be applies to the range. Regarding reset range we have already provided sample in the below forum link. 

It seems you have posted the same query in an another forum and we have updated solution regarding that. http://www.syncfusion.com/support/forums/grid-windows/106437

Please follow up that forum­ (106437) for further updates.

Regards,

Arun.


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.

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

;