public void ApplyGridPropertyAttribute(GridPropertyAttribute attribute) { IsFilterable = attribute.IsFilterable; IsGroupable = attribute.IsGroupable; IsSortable = attribute.IsSortable; Name = attribute.CustomName ?? Name; HasSummaryCalculationSupport = attribute.HasSummaryCalculationSupport; }
private static void ApplyGridPropertyAttributeIfExist(PropertyInfo propertyInfo, GridTypePropertyModel propertyModel) { GridPropertyAttribute gridParameterAttribute = propertyInfo.GetCustomAttribute <GridPropertyAttribute>(); if (gridParameterAttribute == null) { return; } propertyModel.ApplyGridPropertyAttribute(gridParameterAttribute); }