public override void UpdateItemProps(IListItem item, object rowData) { GlobalOptions gOptions = GlobalOptions.Instance; if ((fRec.ChildToFamilyLinks.Count == 0) && (gOptions.ListHighlightUnparentedPersons)) { item.SetBackColor(ChartRenderer.GetColor(GKData.HighlightUnparentedColor)); } else if ((fRec.SpouseToFamilyLinks.Count == 0) && (gOptions.ListHighlightUnmarriedPersons)) { item.SetBackColor(ChartRenderer.GetColor(GKData.HighlightUnmarriedColor)); } }
public virtual void UpdateItem(int itemIndex, IListItem item, object rowData) { GDMRecord rec = rowData as GDMRecord; if (item == null || rec == null) { return; } Fetch(rec); int num = fColumnsMap.Count; for (int i = 1; i < num; i++) { MapColumnRec colrec = fColumnsMap[i]; // aColIndex - from 1 ListColumn cs = fListColumns[colrec.ColType]; object val = GetColumnValueEx(colrec.ColType, colrec.ColSubtype, true); string res = ConvertColumnValue(val, cs); item.AddSubItem(res); } if (GlobalOptions.Instance.ReadabilityHighlightRows && MathHelper.IsOdd(itemIndex)) { item.SetBackColor(ChartRenderer.GetColor(ChartRenderer.LightGray)); } }
public static void SetBackColor(this IListItem listItem, int color) { if (listItem == null) { return; } var colorHandler = AppHost.GfxProvider.CreateColor(color); listItem.SetBackColor(colorHandler); }