public static IHtmlContent SelectFieldFor <TModel, TValue>( this IHtmlHelper <TModel> html, Expression <Func <TModel, TValue> > expression, IEnumerable <QPSelectListItem> list, SelectOptions options) { return(html.SelectFieldFor(expression, list, null, options)); }
public static MvcHtmlString SelectFieldFor <TModel, TValue>( this HtmlHelper <TModel> html, Expression <Func <TModel, TValue> > expression, IEnumerable <QPSelectListItem> list, Dictionary <string, object> htmlAttributes = null, SelectOptions options = null, bool required = false ) => MvcHtmlString.Create(string.Format( html.FieldTemplate(ExpressionHelper.GetExpressionText(expression), GetMetaData(html, expression).DisplayName, required: required), html.QpDropDownListFor(expression, list, htmlAttributes, options ?? new SelectOptions()).ToHtmlString() ));
public static IHtmlContent SelectFieldFor <TModel, TValue>( this IHtmlHelper <TModel> html, Expression <Func <TModel, TValue> > expression, IEnumerable <QPSelectListItem> list, Dictionary <string, object> htmlAttributes = null, SelectOptions options = null, bool required = false) { return(html.FieldTemplate( html.QpDropDownListFor(expression, list, htmlAttributes, options ?? new SelectOptions()), html.ModelExpressionProvider().GetExpressionText(expression), GetMetaData(html, expression).DisplayName, required: required)); }
public static MvcHtmlString SelectFieldFor <TModel, TValue>( this HtmlHelper <TModel> html, Expression <Func <TModel, TValue> > expression, IEnumerable <QPSelectListItem> list, SelectOptions options ) => html.SelectFieldFor(expression, list, null, options);