BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
GridTextColumn customColumn = new GridTextColumn(); customColumn.UserCellType = typeof(CustomCell); customColumn.MappingName = "CustomColumn"; public class CustomCell : GridCell { UILabel stocktext;
public CustomCell () { stocktext = new UILabel (); stocktext.Font = UIFont.SystemFontOfSize (20); this.Add (stocktext); this.CanRenderUnLoad = false; }
protected override void UnLoad () { this.RemoveFromSuperview (); }
public override void LayoutSubviews () { base.LayoutSubviews ();
if (Convert.ToDouble (DataColumn.CellValue) < 0) { this.stocktext.TextColor = UIColor.Red; } else { this.stocktext.TextColor = UIColor.Green; } this.stocktext.Frame = new CoreGraphics.CGRect (Bounds.Left, Bounds.Top, Bounds.Width, Bounds.Height); this.stocktext.Font = DataColumn.GridColumn.RecordFont; this.stocktext.TextAlignment = UITextAlignment.Right; this.stocktext.Text = DataColumn.CellValue.ToString (); }
protected override void Dispose (bool disposing) { if (stocktext != null) { stocktext.Dispose (); stocktext = null; } base.Dispose (disposing); } |