public Select( string selectedValue = null, DataSource datasource = null, SelectAppearanceType appearance = null, bool liveSearch = false, bool showTick = false, bool showArrow = false, bool autoWidth = true, string width = null, bool disabled = false, string header = null, string container = null, string clientId = null) : base("_Select", clientId) { SetSelectedValue(selectedValue) .SetDataSource(datasource) .SetAppearance(appearance) .SetLiveSearch(liveSearch) .SetTick(showTick) .SetArrow(showArrow) .SetDisabled(disabled) .SetHeader(header) .SetContainer(container); if (width != null) SetWidth(width); else SetAutoWidth(); }
public static MvcHtmlString UxSelectWithDataSource(this HtmlHelper htmlHelper, DataSource dataSource, string selectedValue = null, SelectAppearanceType appearance = null, bool liveSearch = false, bool showTick = false, bool showArrow = false, bool autoWidth = true, string width = null, bool disabled = false, string header = null, string container = null, string clientId = null) { var select = new Select(selectedValue, dataSource, appearance, liveSearch, showTick, showArrow, autoWidth, width, disabled, header, container, clientId); MvcHtmlString start = htmlHelper.Partial("ControlTemplates/" + select.ViewTemplate + "Start", select); MvcHtmlString end = htmlHelper.Partial("ControlTemplates/" + select.ViewTemplate + "End", select); return MvcHtmlString.Create(start.ToHtmlString() + end.ToHtmlString()); }
public Select SetAppearance(SelectAppearanceType appearance) { Appearance = appearance ?? SelectAppearanceType.Default; return this; }
public static IDisposable UxSelect(this HtmlHelper htmlHelper, SelectAppearanceType appearance = null, bool liveSearch = false, bool showTick = false, bool showArrow = false, bool autoWidth = true, string width = null, bool disabled = false, string header = null, string container = null, string clientId = null) { var select = new Select(null, null, appearance, liveSearch, showTick, showArrow, autoWidth, width, disabled, header, container, clientId); return RenderUxDispoableWebControl(htmlHelper, select); }