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.

Extraneous Lines when Hiding Rows

Thread ID:

Created:

Updated:

Platform:

Replies:

59695 Apr 19,2007 05:03 PM Jul 2,2007 05:57 AM Windows Forms 3
loading
Tags: GridControl
TJM
Asked On April 19, 2007 05:03 PM

I am using the HideRows functionality to create expand / collapse sections within the Grid. The problem I am seeing is that when these sections are collapsed, I am getting extra horizontal lines in any columns that contain bordered cells.

I have attached a zip file containing an example of what I am seeing. If you run the example, you will see 4 collapsed sections and each section generates a horizontal line in columns D and E.

These sections can be expanded and collapsed by clicking the X (or Y) in column A.

I have also noticed that when scrolling a screens with these collapsed sections, the scroll acts as if the sections are still there (the scroll seems to slow down as it passes these sections).

Am I missing something or is there a better way to implement this functionality?

Thanks for your input,
Tom Murphy

WindowsApplication314.zip

Administrator [Syncfusion]
Replied On April 20, 2007 01:16 PM

Just an observation on this problem. If you comment out the

gridControl1.Model.CoveredRanges.Add(GridRangeInfo.Cells(row, column, row, column + 1));

then the problem goes away. This suggests that our covered range calculations may be off by a pixel on the bottom side.

You can also avoid the problem by not setting the Bottom border. So, a work around might be to conditionally set/unset the bottom border for teh covered cell range depending upon whether the range is visible or not.

But the bigger question is how do you efficiently hide/show rows in a grid. You mention you see the scrolling slowing down with the hidden rows.

The best way to do this is to use a virtual grid. Think of having some type of list (ArrayList or List<> or ???) that holds all your rows (ie, your row objects, the data that appears in the rows). Then think of having a second list that simply holds indexes of the rows from you first list that are visible in the grid. Then if you use a virtual grid based on the second list, you would only be working with the visible row counts. So, if you have 20 of 1000 rows visible, your grid would have 20 items items in it, and the scrolling would be very efficient. Take a look at the VirtualTreeGrid sample we ship. The use of a list of visible row indexes is how this sample works. Depending on the ratio of hidden to total rows that you need to handle, you might want to consider using a virtual grid to manage collapsing rows in the grid.


TJM
Replied On May 1, 2007 02:36 PM

Thanks for your feedback.

I commented out the "CoveredRanges" line as suggested, and the problem did go away. However, now the dropdown does not span multiple columns. I can go ahead and add logic to add and remove the bottom border but I am resisting this as it will impact the performance of the expand and collapse. Any thoughts on how long it will take to track the bug down and issue a fix?

I had looked into the concept of a virtual grid when displaying. Please correct me if I am wrong, but I believe using this idea would require a redraw of the screen with each change. My main issue here is that the user would see a "flicker" on the screen during this redraw. Currently, we are using a dymanic update that goes through and only updates the component's "text" property for fields that have changed thus avoiding the "flicker".

Thanks for your input.
Tom Murphy

Jeba S [Syncfusion]
Replied On July 2, 2007 05:57 AM

Hi TJM,

Your Direct-Trac incident 33794 is updated. Please follow up the incident for this query.

Thank you for your interest in Syncfusion Products.

Best Regards,
Jeba.

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.

;