this.SfGrid.QueryRowHeight += GridQueryRowHeight; private void GridQueryRowHeight (object sender, QueryRowHeightEventArgs e) { if (e.Height > 45) { e.Height = 45; e.Handled = true; } else if (e.RowIndex == 3) { e.Height = 40; e.Handled = true; } |
GridTextColumn customColumn = new GridTextColumn(); customColumn.UserCellType = typeof(CustomGridCell); customColumn.MappingName = "Address"; public class CustomGridCell : GridCell { UILabel street; UILabel city;
public CustomGridCell() { this.CanRenderUnLoad = false; street = new UILabel(); city = new UILabel(); this.AddSubview(street); this.AddSubview(city); }
protected override void UnLoad() { this.RemoveFromSuperview(); }
public override void LayoutSubviews() { this.street.Frame = new CGRect(0, 0, Bounds.Width, Bounds.Height / 2); this.city.Frame = new CGRect(0, Bounds.Height / 2, Bounds.Width, Bounds.Height / 2); base.LayoutSubviews(); }
protected override void Dispose(bool disposing) { this.street = null; this.city = null; base.Dispose(disposing); } |