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. Image for the cookie policy date

GridGroupingControl RowHeight

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.

Thanks

6 Replies

HA haneefm Syncfusion Team June 25, 2007 08:22 PM UTC

Hi Michael,

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 sample
GGCRowHeights

For more details, See the ResizableRows browser sample.
Syncfusion\Essential Studio\4.2.0.37\windows\Grid.Grouping.Windows\Samples\ResizableRows\

Best regards,
Haneef


MS Michael Sabin June 25, 2007 09:01 PM UTC

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.



MS Michael Sabin June 29, 2007 05:28 PM UTC

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


HA haneefm Syncfusion Team June 29, 2007 10:20 PM UTC

Hi Michael,

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.
this.InvalidateCounterBottomUp();
return rowHeight != -1 ? rowHeight : base.GetYAmountCount();
}

Sample :ModifiedGGcHideRows.zip

Also refer the bleow forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=50138

Best regards,
Haneef


MS Michael Sabin July 2, 2007 12:50 PM UTC

I tried calling the InvalidateCounterButtomUp method, but it seemed to make the performance worse than it was.

Thanks,

Michael


HA haneefm Syncfusion Team July 2, 2007 08:40 PM UTC

Hello Michael,

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

Best regards,
Haneef.

Loader.
Live Chat Icon For mobile
Up arrow icon