Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
IGGridView column sizing
posted

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

Parents
  • 40030
    Suggested Answer
    Offline posted

    Hi, 

    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

Reply Children