Jun 25,2007 03:25 PM
Jul 2,2007 04:40 PM
Asked on June 25, 2007 03:25 PM
I am using a GridGroupingControl w/ the following setup:
Each entry in the grid is comprised of three rows.
In some cases, only the first row will be visible, in some cases the first two rows, and in other cases, only the last row should be visible.
I am currently setting the row heights in the following manner:
At loading time, I iterate through the UnsortedRecords collection of the grid's Table. For each GridRecord, I access the RecordRows and set the height there.
One thing to note is that I am using a custom GridRecordRow that implements IGridRowHeight.
Using this behavior causes some issues with scrolling, when the grid is loaded up. If I comment out the code to set the row heights, scrolling works fine. The problem only occurs when the RowHeights are modified.
Replied on June 25, 2007 04:22 PM
By default, The GroupingGrid doesn't support for individual rowheights. But you can do this by using the custom grouping engine. The Attached sample demonstrates the feature resizing individual rows in the grid. It also implements the IGridRowHeight interface and its routines for getting,setting and preventing row height for elements.I have tested this attached sample to reproduce this problem, but i could not get the problem. I recommend modifying the attached sample or any of our browser sample to reproduce the problem. This helps us to realize a better solution at the earliest.
Here is a sampleGGCRowHeights
For more details, See the ResizableRows browser sample.
Replied on June 25, 2007 05:01 PM
Yes, I am actually doing the same thing on my end. Unfortunately, I can't reproduce it using your sample. My grid is using a lot more data, and we are overloading the engine group to hide groups with one member.
Replied on June 29, 2007 01:28 PM
OK, I was able to reproduce. I added the customEngine that I am using in my production environment. If you click on Hide Rows and then scroll, eventually it bombs out.GGcHideRows1.zip
Replied on June 29, 2007 06:20 PM
Try calling the InvalidateCounterBottomUp() method inside the GetYAmountCount() override method. Please refer to the modified attached sample for more details and let me know if this helps.
public override double GetYAmountCount()
// Note: whenever the value that is returned by GetYAmountCount changes
// make sure you call InvalidateCounterBottomUp so that the engine
// is aware of the change and counters are recalculated. See
// the RowHeight setter.
return rowHeight != -1 ? rowHeight : base.GetYAmountCount();
Also refer the bleow forum thread for more details.http://www.syncfusion.com/support/forums/message.aspx?&MessageID=50138
Replied on July 2, 2007 08:50 AM
I tried calling the InvalidateCounterButtomUp method, but it seemed to make the performance worse than it was.
Replied on July 2, 2007 04:40 PM
The best way to do this would be to have an extra column in your DataTable say ‘HideStatus’ to keep track of the hidden rows. You can initially set the value to be false and apply filter from Grid to show the records that satisfy the false criteria. So whenever you need to hide a row, you just need to set the bool value of that Row field to true. This will be very faster.
Please refer this sample for the implementation.GGCHideRows