ListBoxExtension.BindList(Object) Method
In This Article
Binds an item list to the ListBox editor.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
NuGet Package: DevExpress.Web.Mvc5
#Declaration
public ListBoxExtension BindList(
object dataObject
)
#Parameters
Name | Type | Description |
---|---|---|
data |
Object | An object representing the bound data source. |
#Returns
Type | Description |
---|---|
List |
A List |
#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