aspnet-devexpress-dot-web-dot-aspxgridcolumndataeventargs-dot-getlistsourcefieldvalue-x28-system-dot-string-x29.md
Returns the value of the specified cell in the processed data item (row, card or record) in the control’s underlying data source.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public object GetListSourceFieldValue(
string fieldName
)
Public Function GetListSourceFieldValue(
fieldName As String
) As Object
| Name | Type | Description |
|---|---|---|
| fieldName | String |
A string that specifies the required field name.
|
| Type | Description |
|---|---|
| Object |
An object that is a value from the control’s data source.
|
The GetListSourceFieldValue method returns a value from the specified field in the processed data item in the control’s underlying data source. To get values in other rows, use the GetListSourceFieldValue method’s overload.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetListSourceFieldValue(String) method.
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.
asp-net-web-forms-grid-set-edit-form-values/CS/Solution/ClientSide.aspx.cs#L10
if (e.Column.FieldName == "Total") {
decimal price = (decimal)e.GetListSourceFieldValue("UnitPrice");
int quantity = Convert.ToInt32(e.GetListSourceFieldValue("UnitsInStock"));
asp-net-web-forms-grid-set-edit-form-values/VB/Solution/ClientSide.aspx.vb#L13
If Equals(e.Column.FieldName, "Total") Then
Dim price As Decimal = CDec(e.GetListSourceFieldValue("UnitPrice"))
Dim quantity As Integer = Convert.ToInt32(e.GetListSourceFieldValue("UnitsInStock"))
See Also
ASPxGridColumnDataEventArgs Class