Class ComboBoxPropertiesBuilder
Holds the ComboBox properties.
Inheritance
Inherited Members
Namespace: Syncfusion.JavaScript
Assembly: Syncfusion.EJ.dll
Syntax
public class ComboBoxPropertiesBuilder : IPropertiesBuilder, IHtmlString
Constructors
ComboBoxPropertiesBuilder()
Declaration
public ComboBoxPropertiesBuilder()
ComboBoxPropertiesBuilder(ComboBox)
Initializes a new instance of the ComboBoxPropertiesBuilder class.
Declaration
public ComboBoxPropertiesBuilder(ComboBox comboBox)
Parameters
Type | Name | Description |
---|---|---|
ComboBox | comboBox | Accepts the ComboBox properties |
Fields
comboBox
Initializes a new instance of the ComboBoxPropertiesBuilder class.
Declaration
public ComboBox comboBox
Field Value
Type | Description |
---|---|
ComboBox |
Methods
ActionFailureTemplate(String)
Accepts the template and assigns it to popup list content of the component, when the data fetch request fails from the remote server.
Declaration
public ComboBoxPropertiesBuilder ActionFailureTemplate(string actionFailureTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | actionFailureTemplate |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
AllowCustom()
Specifies whether the component allows user defined value which does not exist in dataSource
.
Declaration
public ComboBoxPropertiesBuilder AllowCustom()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
AllowCustom(Boolean)
Specifies whether the component allows user defined value which does not exist in dataSource
.
Declaration
public ComboBoxPropertiesBuilder AllowCustom(bool allowCustom)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowCustom |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
AllowFiltering()
When set to true, enables the filtering option of component.
On typing a character into a search box, the filter action retrieves the matched items through the filtering
event.
If no matches found, then the value of noRecordsTemplate
property will be shown.
Declaration
public ComboBoxPropertiesBuilder AllowFiltering()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
AllowFiltering(Boolean)
When set to true, enables the filtering option of component.
On typing a character into a search box, the filter action retrieves the matched items through the filtering
event.
If no matches found, then the value of noRecordsTemplate
property will be shown.
Declaration
public ComboBoxPropertiesBuilder AllowFiltering(bool allowFiltering)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowFiltering |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
AutoFill()
Specifies whether suggest a first matched item in input when searching. No action happens when no matches found.
Declaration
public ComboBoxPropertiesBuilder AutoFill()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
AutoFill(Boolean)
Specifies whether suggest a first matched item in input when searching. No action happens when no matches found.
Declaration
public ComboBoxPropertiesBuilder AutoFill(bool autoFill)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | autoFill | autoFill |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
ClientSideEvents(Action<ComboBoxClientSideEventsBuilder>)
ComboBox ClientSide Events
Declaration
public ComboBoxPropertiesBuilder ClientSideEvents(Action<ComboBoxClientSideEventsBuilder> clientSideEvents)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ComboBoxClientSideEventsBuilder> | clientSideEvents |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder |
ComboBoxFields(Action<ComboBoxFieldsBuilder>)
ComboBox fields
Declaration
public ComboBoxPropertiesBuilder ComboBoxFields(Action<ComboBoxFieldsBuilder> fields)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ComboBoxFieldsBuilder> | fields | fields |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
CssClass(String)
Dropdown widget’s style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass property. You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied.with string argument.
Declaration
public ComboBoxPropertiesBuilder CssClass(string customCssClass)
Parameters
Type | Name | Description |
---|---|---|
System.String | customCssClass | cssClass |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
Datasource(DataSource)
This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the instance of the ej.DataManager.with object argument.
Declaration
public ComboBoxPropertiesBuilder Datasource(DataSource dataSource)
Parameters
Type | Name | Description |
---|---|---|
DataSource | dataSource | dataSource |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns object value |
Datasource(Action<DataSourceBuilder>)
This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the instance of the ej.DataManager.with array argument.
Declaration
public ComboBoxPropertiesBuilder Datasource(Action<DataSourceBuilder> dataSource)
Parameters
Type | Name | Description |
---|---|---|
System.Action<DataSourceBuilder> | dataSource |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder |
Datasource(IEnumerable)
This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the instance of the ej.DataManager.with IEnumerable argument.
Declaration
public ComboBoxPropertiesBuilder Datasource(IEnumerable dataSource)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder |
Enabled()
This property is used to indicate whether the ComboBox control responds to the user interaction or not. By default, the control is in the enabled mode and you can disable it by setting it to false.
Declaration
public ComboBoxPropertiesBuilder Enabled()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
Enabled(Boolean)
This property is used to indicate whether the ComboBox control responds to the user interaction or not. By default, the control is in the enabled mode and you can disable it by setting it to false with boolean argument.
Declaration
public ComboBoxPropertiesBuilder Enabled(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | enabled |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
EnableRTL()
Sets the ComboBox textbox direction from right to left align.
Declaration
public ComboBoxPropertiesBuilder EnableRTL()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
EnableRTL(Boolean)
Sets the ComboBox textbox direction from right to left align with boolean argument.
Declaration
public ComboBoxPropertiesBuilder EnableRTL(bool enableRTL)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enableRTL | enableRTL |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
FooterTemplate(String)
Used to create visualized footer for combobox items.with string argument.
Declaration
public ComboBoxPropertiesBuilder FooterTemplate(string footerTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | footerTemplate | footerTemplate |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
GroupTemplate(String)
By default, Accepts the template design and assign it to each list item of component, you can use this template support.with string argument.
Declaration
public ComboBoxPropertiesBuilder GroupTemplate(string template)
Parameters
Type | Name | Description |
---|---|---|
System.String | template |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
HeaderTemplate(String)
Used to create visualized header for combobox items.with string argument.
Declaration
public ComboBoxPropertiesBuilder HeaderTemplate(string headerTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | headerTemplate | headerTemplate |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
HtmlAttributes(IDictionary<String, Object>)
It sets the given HTML attributes for the ComboBox control such as ID, name, disabled, etc.
Declaration
public ComboBoxPropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | itemHtmlAttributes | htmlAttributes |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns object value |
Index(Nullable<Int32>)
Gets or sets the index of the selected item in the component.
Declaration
public ComboBoxPropertiesBuilder Index(int? index)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | index | index |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns number value |
ItemTemplate(String)
By default, you can add any text or image to the ComboBox item. To customize the item layout or to create your own visualized elements, you can use this template support.with string argument.
Declaration
public ComboBoxPropertiesBuilder ItemTemplate(string template)
Parameters
Type | Name | Description |
---|---|---|
System.String | template |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
Locale(String)
Different culture can be given locale property, Text present in comboBox will be localized to respective culture.
Declaration
public ComboBoxPropertiesBuilder Locale(string locale)
Parameters
Type | Name | Description |
---|---|---|
System.String | locale |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder |
NoRecordsTemplate(String)
Accepts the template design and assign it to popup list of component, when no data is available on the component.
Declaration
public ComboBoxPropertiesBuilder NoRecordsTemplate(string noRecordsTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | noRecordsTemplate |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
Placeholder(String)
Specifies a short hint that describes the expected value of the ComboBox control.with string argument.
Declaration
public ComboBoxPropertiesBuilder Placeholder(string watermarkText)
Parameters
Type | Name | Description |
---|---|---|
System.String | watermarkText |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
PopupHeight(String)
Defines the height of the suggestion popup box in the ComboBox control.with string argument.
Declaration
public ComboBoxPropertiesBuilder PopupHeight(string popupHeight)
Parameters
Type | Name | Description |
---|---|---|
System.String | popupHeight | popupHeight |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
PopupWidth(String)
Defines the width of the suggestion popup box in the ComboBox control.with string argument.
Declaration
public ComboBoxPropertiesBuilder PopupWidth(string popupWidth)
Parameters
Type | Name | Description |
---|---|---|
System.String | popupWidth | popupWidth |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
Query(String)
with string argument.
Declaration
public ComboBoxPropertiesBuilder Query(string query)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | query |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
ReadOnly()
Specifies that the ComboBox textbox values should be read-only.
Declaration
public ComboBoxPropertiesBuilder ReadOnly()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
ReadOnly(Boolean)
Specifies that the ComboBox textbox values should be read-only.with boolean argument.
Declaration
public ComboBoxPropertiesBuilder ReadOnly(bool readOnly)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | readOnly | readOnly |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
Render()
Renders this instance.
Declaration
public void Render()
ShowClearButton()
Specifies whether show or hide the clear button for the component value
, text
and index
properties are reset as null
on clicking clear button.
Declaration
public ComboBoxPropertiesBuilder ShowClearButton()
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
ShowClearButton(Boolean)
Specifies whether show or hide the clear button for the component value
, text
and index
properties are reset as null
on clicking clear button.
Declaration
public ComboBoxPropertiesBuilder ShowClearButton(bool showClearButton)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | showClearButton |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns boolean value |
SortOrder(SortOrder)
When the enableSorting property value is set to true, this property helps to sort the items either in ascending or descending order.with string argument.
Declaration
public ComboBoxPropertiesBuilder SortOrder(SortOrder sortOrder)
Parameters
Type | Name | Description |
---|---|---|
SortOrder | sortOrder | sortOrder |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns enum value |
Text(String)
Defines the text value that is displayed in the ComboBox textbox.with string argument.
Declaration
public ComboBoxPropertiesBuilder Text(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | text |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
ToHtmlString()
Returns an HTML-encoded string.
Declaration
public string ToHtmlString()
Returns
Type | Description |
---|---|
System.String |
Value(Object)
Specifies the value (text content) for the ComboBox control.with string argument.
Declaration
public ComboBoxPropertiesBuilder Value(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | value |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
ValueTemplate(String)
Accepts the template design and assign it to the selected list item to an input element of component
Declaration
public ComboBoxPropertiesBuilder ValueTemplate(string valueTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | valueTemplate | valueTemplate |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |
Width(String)
Defines the width of the ComboBox textbox.with string argument.
Declaration
public ComboBoxPropertiesBuilder Width(string width)
Parameters
Type | Name | Description |
---|---|---|
System.String | width | width |
Returns
Type | Description |
---|---|
ComboBoxPropertiesBuilder | This method returns string value |