ListBoxExtension.BindList(Object) Method
Binds an item list to the ListBox editor.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v25.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| dataObject | Object | An object representing the bound data source. |
Returns
| Type | Description |
|---|---|
| ListBoxExtension | A ListBoxExtension object representing the ListBox. |
Remarks
Use the BindList(Object) method to bind the ListBox to an item list.
@Html.DevExpress().ListBox(settings => {
settings.Name = "lbFeatures";
settings.Width = 285;
settings.Height = 210;
settings.Properties.Caption = "Phone features:";
settings.Properties.CaptionSettings.Position = EditorCaptionPosition.Top;
settings.Properties.ValueField = "ID";
settings.Properties.ValueType = typeof(string);
settings.Properties.TextField = "Name";
}).BindList(Model).GetHtml()
See Also