/// <summary> /// Gets the right column value /// </summary> /// <param name="column">The column.</param> /// <param name="pce">The pce.</param> /// <param name="c">Row count - required if <see cref="imbSCI.Core.collection.PropertyEntryColumn.autocount_idcolumn"/> is the <c>column</c>.</param> /// <param name="autocount_format">The autocount format.</param> /// <returns></returns> public static object getColumnValue(this PropertyEntry column, PropertyCollectionExtended pce, int c, string autocount_format) { object vl = getColumnValue_Default; object key = column[PropertyEntryColumn.entry_key]; if (key is PropertyEntryColumn) { PropertyEntryColumn pec = (PropertyEntryColumn)key; switch (pec) { case PropertyEntryColumn.entry_name: vl = pce.name; break; case PropertyEntryColumn.entry_description: vl = pce.description; break; case PropertyEntryColumn.autocount_idcolumn: vl = c.ToString(autocount_format); break; default: vl = column.getColumn(pec, pce[key]); break; } } else { vl = pce[key]; } return(vl); }