aspnet-devexpress-dot-web-dot-aspxcombobox-16fa429b.md
Gets or sets the editor’s edited value.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public override object Value { get; set; }
Public Overrides Property Value As Object
| Type | Description |
|---|---|
| Object |
A Object value representing the editor’s value.
|
Use the Value property to manipulate the editor’s value.
If you need to validate the editor’s value before posting it, you can handle either the client-side ASPxClientEdit.Validate or server-side ASPxEdit.Validate events, or both. If no validation is performed and the value posted is incorrect, then an exception is raised.
Note
If the ASPxComboBox’s ASPxAutoCompleteBoxBase.Items collection is not initialized, Value returns the ASPxComboBox.SelectedItem‘s ListEditItem.Text property value.
If the Value property returns null, make sure that you set the ValueType property to an .NET type that matches the ValueField column type. Otherwise, the editor cannot find the corresponding item because the editor’s ValueType property does not match the item type (String by default).
The following code snippets (auto-collected from DevExpress Examples) contain references to the Value property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
object oldCat1 = Session["Cat1ID"];
if(oldCat1 != null && oldCat1.Equals(combo1.Value)) return;
Session["Cat1ID"] = combo1.Value;
cbRecurrenceType.Value = container.RecurrenceType.ToString();
cmb.DataBind();
cmb.Value = dataValue;
container.Controls.Add(cmb);
reporting-web-forms-view-report/CS/T132094/Default.aspx.cs#L35
protected void btPreview_Click(object sender, EventArgs e) {
string reportName = (string) cbReportType.Value;
Dim oldCat1 As Object = Session("Cat1ID")
If oldCat1 IsNot Nothing AndAlso oldCat1.Equals(combo1.Value) Then
Return
cbRecurrenceType.Value = container.RecurrenceType.ToString()
cmb.DataBind()
cmb.Value = dataValue
container.Controls.Add(cmb)
reporting-web-forms-view-report/VB/T132094/Default.aspx.vb#L34
Protected Sub btPreview_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim reportName As String = CStr(cbReportType.Value)
See Also