ComboBox
複数列のドロップダウン
機能
サンプル
説明
このサンプルでは、「multi-column」クラスをコントロールではなくドロップダウンに適用しています。そのために「DropDownCssClass」を使用しました。
ソース
MultiColumnDropDownController.cs
using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class ComboBoxController { public ActionResult MultiColumnDropDown() { return View(Models.Cities.GetCities()); } } }
MultiColumnDropDown.cshtml
@model IEnumerable<string> @Html.C1().ComboBox().Bind(Model).SelectedIndex(0).IsEditable(false).DropDownCssClass("multi-column") @section Description{ @Html.Raw(Resources.ComboBox.MultiColumnDropDown_Text0) }
マニュアル