Back to Devexpress

ComboBoxSettings Class

aspnetmvc-devexpress-dot-web-dot-mvc-729f534f.md

latest3.0 KB
Original Source

ComboBoxSettings Class

Contains the ComboBox extension settings.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public class ComboBoxSettings :
    AutoCompleteBoxBaseSettings
vb
Public Class ComboBoxSettings
    Inherits AutoCompleteBoxBaseSettings

Remarks

To declare the ComboBox in a View, invoke the ExtensionsFactory.ComboBox helper method. This method returns the ComboBox extension that is implemented by the ComboBoxExtension class.

To configure the ComboBox extension, pass the ComboBoxSettings object to the ExtensionsFactory.ComboBox helper method as a parameter. The ComboBoxSettings object contains all the ComboBox extension settings.

To access the ComboBox specific settings, refer to the ComboBoxSettings.Properties property.

Refer to the ComboBox Overview topic to learn how to add the ComboBox extension to your project.

cshtml
Html.DevExpress().ComboBox(
    settings => {
        settings.Name = "comboBox1";

        settings.Width = 180;
        settings.SelectedIndex = 0;
        settings.Properties.DisplayFormatString = "DXp v. {0}";
        settings.Properties.ValueType = typeof(string);

        settings.Properties.Items.Add("2009.3");
        settings.Properties.Items.Add("2010.1");
        settings.Properties.Items.Add("2010.2");
    }
).GetHtml();

Inheritance

Object SettingsBase EditorSettings AutoCompleteBoxBaseSettings ComboBoxSettings

See Also

ComboBoxSettings Members

ComboBox

ComboBoxExtension

DevExpress.Web.Mvc Namespace