public void BindFieldsGrid( List<RegistrationTemplateFormField> formFields )
{
_gFields.DataSource = formFields
.OrderBy( a => a.Order )
.Select( a => new
{
a.Id,
a.Guid,
Name = a.FieldSource == RegistrationFieldSource.PersonField ?
a.PersonFieldType.ToString() :
a.Attribute.Name,
FieldSource = a.FieldSource.ConvertToString(),
FieldType = a.FieldSource == RegistrationFieldSource.PersonField ? 0 : a.Attribute.FieldTypeId,
a.IsInternal,
a.IsSharedValue,
a.ShowCurrentValue,
a.IsRequired,
a.IsGridField
} )
.ToList();
_gFields.DataBind();
}