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.

QueryHideRow never called

Thread ID:

Created:

Updated:

Platform:

Replies:

5848 Jul 20,2003 12:15 PM Jun 14,2004 05:52 AM Windows Forms 7
loading
Tags: GridControl
Jan Hornych
Asked On July 20, 2003 12:15 PM

Hi, I have a virtual grid, I use GridControl with event handlers for QueryColCount, QueryRowCount, QueryCellInfo, SaveCellInfo and QueryCoveredRange. I need also to implement hiding rows at runtime, so I created event handlers for QueryHideRow and SaveHideRow. But none of both is ever called ! Why ? Do I need to activate it somehow or am I doing something what suppresses the events ? Thanks for help. Regards, Jan

Administrator [Syncfusion]
Replied On July 20, 2003 01:16 PM

If you want to dynamically hide rows, you can handle the QueryRowHeight event setting s.Size = 0 and e.Handled = true for the row you want to hide.

Jan Hornych
Replied On July 21, 2003 02:15 AM

Its very slow, allready with 10 rows by 10 cols. I need to have 10000 rows in my grid, than it's unusable. There must be something redundant repeated many times. Any idea what to optimize ? Regards, Jan

Jan Hornych
Replied On July 21, 2003 02:34 AM

I write now trace info of calling event handlers. The QueryRowHeight is called for all rows from the first to the last, then backwards and again up and down, over and over.

Administrator [Syncfusion]
Replied On July 24, 2003 08:24 AM

It turns out that dynamic hiding of rows in QueryRowHeight breaks scrolling, so you will not be able to do it there. To hide the rows, you will have to explicitly set gridControl1.Rows.Hidden[row] = true; (or something equivalent). So, what are the conditions that determine whether a row should be hidden? Maybe, there will be some event that you can catch to explicitly set the Hidden property when these conditions become true.

Jan Hornych
Replied On August 5, 2003 03:50 AM

Hi Clay, using Rows.Hidden might work OK for scrolling but the overall performance is extremely slow as I have 10000 rows in the grid. I understand the internal algorithms need to query info for every row, hidden or not, to do painting and scrolling properly. Therefore my approach is probably overloading the grid. In this forum, I have found your advice to the question of Sue Harris at 3/31/2003 10:42:20 PM, where you recommend using an ArrayList as a "filter" to the real data, so the grid works over a virtual, smaller data. I'm thinking of using this solution. Does it have any drawbacks ? Will scrolling and painting be ok, as the number of rows reported by QueryRowCount will change often ? Thanks, Jan

Administrator [Syncfusion]
Replied On August 5, 2003 05:12 AM

Given a datasource, and using an arraylist to track exactly the rows you want visible in the grid, and then using this arraylist in QueryCellInfo and QueryRowCount to provide the proper mappings works well. Essentially, the grid thinks it is displaying exactly the arraylist, so scrolling and drawing is not a problem. The drawbacks are general drawbacks associated with any virtual grid. They include added complexity if you want to support sorting or moving rows, etc. You can see a sample of this idea in the VirtTreeGrid Sample. No that sample is probably a little slower than what you would normally see as it is doing dynamic processing to determine what rows are hidden or not by looking at whether a rows parent is visible. If you are just inserting and removing indexes to make rows visible or not, that code should be faster than the VirtTreeGrid code (I think.).

Administrator [Syncfusion]
Replied On June 14, 2004 05:52 AM

> If you want to dynamically hide rows, you can handle the QueryRowHeight event setting s.Size = 0 and e.Handled = true for the row you want to hide. >

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.

;