Version: 2.0 |

ComboBoxFormGroup

in namespace DotVVM.Framework.Controls.Bootstrap4

Renders a FormGroup control with a ComboBox

Properties

Name Type Description Notes Default Value
ContentTemplate List<DotvvmControl> Gets or sets the content of the form group.
attribute
inner element
static value
bindable
default
DataSource Object Gets or sets the source collection or a GridViewDataSet that contains data in the control.
attribute
inner element
static value
bindable
default
EmptyItemText String Text displayed when no value is selected.
attribute
inner element
static value
bindable
default
Enabled Boolean Gets or sets a value indicating whether the control is enabled and can be modified.
attribute
inner element
static value
bindable
default
False
FormControlStyle BootstrapFormStyle Gets or sets the Bootstrap form style of the control.
attribute
inner element
static value
bindable
default
Default
ItemTextBinding IValueBinding The expression of DataSource item that will be displayed in the control.
attribute
inner element
static value
bindable
default
ItemTitleBinding IValueBinding The expression of DataSource item that will be placed into html title attribute.
attribute
inner element
static value
bindable
default
ItemValueBinding IValueBinding The expression of DataSource item that will be passed to the SelectedValue property when the item is selected.
attribute
inner element
static value
bindable
default
LabelSize Int32? Gets or sets the size of size the label area for all screen sizes. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
LabelSizeLG Int32? Gets or sets the size of the label area large screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
LabelSizeMD Int32? Gets or sets the size of the label area for medium screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
LabelSizeSM Int32? Gets or sets the size of the label area small screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
LabelSizeXL Int32? Gets or sets the size of the label area for extra large screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
LabelTemplate ITemplate Gets or sets the template of the label area. This property cannot be combined with the LabelText property.
attribute
inner element
static value
bindable
default
LabelText String Gets or sets the label text. This property cannot be combined with the LabelTemplate property.
attribute
inner element
static value
bindable
default
SelectedValue Object Gets or sets the value of the selected item.
attribute
inner element
static value
bindable
default
Size Size Gets or sets the size of controls in the form group.
attribute
inner element
static value
bindable
default
Default
Type FormGroupType Gets or sets the type of the form.
attribute
inner element
static value
bindable
default
Default

Events

Name Type Description
SelectionChanged Command Gets or sets the command that will be triggered when the selection is changed.

Usage & Scenarios

Represents a ComboBox in FormGroup.

HTML Rendered by the Control

Sample 1: Form Group properties

ComboBoxFormGroup is just wrapper around ComboBox inside FormGroup, so you can use any of the properties of the FormGroup and ComboBox to configure desired behaviour.

For example you can use the Label property to set the Label of the FormGroup.

<bs:ComboBoxFormGroup DataSource="{value: Fruits}"  SelectedValue="{value: SelectedFruit}" LabelText="Fruits" />
using DotVVM.Framework.ViewModel;

namespace DotvvmWeb.Views.Docs.Controls.bootstrap4.ComboBoxFormGroup.sample1
{
    public class ViewModel : DotvvmViewModelBase
    {
        public string[] Fruits { get; set; } = { "Apple", "Banana", "Orange" };

        public string SelectedFruit { get; set; }
    }
}

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message