ListEditItemRequestedByValueEventArgs.Value Property
Gets an object that is the requested item’s value.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Description |
---|---|
Object | A Object that is the item’s value. |
#Remarks
To get the requested item’s text, use the ListEditItemRequestedByValueEventArgs.Text property.
#Example
The following section of the Filtering Large Data Source online demo illustrates how the ASPxComboBox.ItemsRequestedByFilterCondition and ASPxComboBox.ItemRequestedByValue events of the ASPxComboBox editor can be handled to filter the editor’s data source containing a large number of records.
Note
To work properly, both the Items
protected void ASPxComboBox_OnItemsRequestedByFilterCondition_SQL(object source,
ListEditItemsRequestedByFilterConditionEventArgs e) {
ASPxComboBox comboBox = (ASPxComboBox)source;
SqlDataSource1.SelectCommand = @"SELECT OID, [From], Sent, Subject
FROM (select OID, [From], Sent, Subject, row_number() over(order by t.Sent) as [rn]
from dbo.ServerSideGridTest as t WHERE ((t.Subject LIKE @filter) OR (t.[From]
LIKE @filter))) as st where st.[rn] between @startIndex and @endIndex";
SqlDataSource1.SelectParameters.Clear();
SqlDataSource1.SelectParameters.Add("filter", TypeCode.String, string.Format("%{0}%", e.Filter));
SqlDataSource1.SelectParameters.Add("startIndex", TypeCode.Int64, (e.BeginIndex + 1).ToString());
SqlDataSource1.SelectParameters.Add("endIndex", TypeCode.Int64, (e.EndIndex + 1).ToString());
comboBox.DataSource = SqlDataSource1;
comboBox.DataBind();
}
protected void ASPxComboBox_OnItemRequestedByValue_SQL(object source,
ListEditItemRequestedByValueEventArgs e) {
ASPxComboBox comboBox = (ASPxComboBox)source;
SqlDataSource1.SelectCommand = @"SELECT OID, Subject, [From], Sent
FROM dbo.ServerSideGridTest WHERE (OID = @OID) ORDER BY Sent";
SqlDataSource1.SelectParameters.Add("OID", TypeCode.Int64, e.Value.ToString());
...
comboBox.DataSource = SqlDataSource1;
comboBox.DataBind();
}
#Related GitHub Examples
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.