public static MvcHtmlString JQM_RadioList(this HtmlHelper htmlHelper, string name, string legend, Enums.OrientationType orientationType, MultiSelectList values, bool isMini = false) { return(JQM_MultiSelection(htmlHelper, Enums.InputType.Radio, name, legend, orientationType, values, isMini)); }
private static MvcHtmlString JQM_MultiSelection(this HtmlHelper htmlHelper, Enums.InputType inputType, string name, string legend, Enums.OrientationType orientationType, MultiSelectList values, bool isMini = false) { List <MvcHtmlString> elements = new List <MvcHtmlString>(); var list = values.ToList(); for (int i = 0; i < list.Count; i++) { var item = list[i]; string id = String.Format("{0}_{1}", name, i); elements.Add(JQM_Label(htmlHelper, item.Text, id)); elements.Add(JQM_Input(htmlHelper, new InputConfig(id, inputType) { Value = item.Value, Selected = item.Selected })); } return(JQM_ControlGroup(htmlHelper, new ControlGroupConfig(orientationType) { Legend = legend, IsMini = isMini }, elements.ToArray())); }
public ControlGroupConfig(Enums.OrientationType orientation) { this.Orientation = orientation; this.Legend = null; }