Serenity.Data.Row.FindFieldByPropertyName C# (CSharp) Method

FindFieldByPropertyName() public method

public FindFieldByPropertyName ( string propertyName ) : Field
propertyName string
return Field
        public Field FindFieldByPropertyName(string propertyName)
        {
            return fields.FindFieldByPropertyName(propertyName);
        }

Usage Example

 public static List<PropertyItem> GetCustomFieldPropertyItems(IEnumerable<ICustomFieldDefinition> definitions, Row row, string fieldPrefix)
 {
     var list = new List<PropertyItem>();
     foreach (var def in definitions)
     {
         string name = fieldPrefix + def.Name;
         var field = row.FindFieldByPropertyName(name) ?? row.FindField(name);
         list.Add(GetCustomFieldPropertyItem(def, field));
     }
     return list;
 }
All Usage Examples Of Serenity.Data.Row::FindFieldByPropertyName