Exemplo n.º 1
0
        public virtual void UpdateItem(IListItem item, object rowData)
        {
            GEDCOMRecord rec = rowData as GEDCOMRecord;

            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);
            }
        }
Exemplo n.º 2
0
        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));
            }
        }