Hi,
sizing the column width by IGGridView.ColumnResizing enums is a really nice feature.But i'm looking for a way, resizing the rows height of the grid accordingly.
I'm using XAMARIN.Any hints ?
Best regards
There isn't a built in mechanism for resizing rows in the UI of the IGGridView. Although i suppose you could implement your own. The IGGridViewDelegate exposes a mode called ResolveRowHeight, which asks for the height of each row in the IGGridView, instead of setting a single height for all rows.
public class GriDelegate : IGGridViewDelegate { public override float ResolveRowHeight(IGGridView gridView, IGRowPath path) { return 20; } }
So you could potentially add a gesture, and store a dictionary of heights based on a row's path, or index. Then, if you invoke UpdateData on the gridView, it would in turn cause the REsolveRowHeight method to be invoked again, and thus adjust your heights.
Also, it may be worth noting that in the newly released 14.1 version, the IGGridViewDataSourceHelper offers an option where row height's can auto size based on their content.
-SteveZ
Hi Steve,
This is the only place I can find any references to variable row height.
I have a delegate based on UIScrollViewDelegate, IIGGridViewDelegate but there is no overrideble ResolveRowHeight.
Do you have c# example of it's use or any more details you can provide?
Thank you
Mark
steve,
I found i ;~)
Just had to dd it to helper.
Steve,
Thanks you for fast response.
the difference is that I use interface and helper function in a grid and my delegate derived as following:
public class MyGridDelegate : UIScrollViewDelegate, IIGGridViewDelegate {
...
do I need to use [Export()] for that?
Hi Mark,
Its definitely there:
public class GridDelegate : IGGridViewDelegate { public override float ResolveRowHeight (IGGridView gridView, IGRowPath path) { return 50; } }
Try using the class i just defined.