public static TThis AddAdditionalViewData <TModel, TValue, TThis, TWrapper>(this FormControlForBase <TModel, TValue, TThis, TWrapper> component, object additionalViewData) where TThis : FormControlForBase <TModel, TValue, TThis, TWrapper> where TWrapper : FormControlForBaseWrapper <TModel>, new() { TThis formControl = component.GetThis(); formControl.AdditionalViewData = additionalViewData; return(formControl); }
public static TThis AddValidationMessage <TModel, TValue, TThis, TWrapper>(this FormControlForBase <TModel, TValue, TThis, TWrapper> component, bool addValidationMessage = true) where TThis : FormControlForBase <TModel, TValue, TThis, TWrapper> where TWrapper : FormControlForBaseWrapper <TModel>, new() { TThis formControl = component.GetThis(); formControl.AddValidationMessage = addValidationMessage; return(formControl); }
public static TThis SetTemplateName <TModel, TValue, TThis, TWrapper>(this FormControlForBase <TModel, TValue, TThis, TWrapper> component, string templateName) where TThis : FormControlForBase <TModel, TValue, TThis, TWrapper> where TWrapper : FormControlForBaseWrapper <TModel>, new() { TThis formControl = component.GetThis(); formControl.TemplateName = templateName; return(formControl); }
public static TThis AddStaticClass <TModel, TValue, TThis, TWrapper>(this FormControlForBase <TModel, TValue, TThis, TWrapper> component, bool addStaticClass = true) where TThis : FormControlForBase <TModel, TValue, TThis, TWrapper> where TWrapper : FormControlForBaseWrapper <TModel>, new() { TThis formControl = component.GetThis(); formControl.ToggleCss(Css.FormControlStatic, addStaticClass); return(formControl); }