wpf-devexpress-dot-xpf-dot-grid-dot-gridcolumndataeventargs-dot-getlistsourcefieldvalue-x28-system-dot-string-x29.md
Returns the value of the specified cell within the processed row in the grid’s data source.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public object GetListSourceFieldValue(
string fieldName
)
Public Function GetListSourceFieldValue(
fieldName As String
) As Object
| Name | Type | Description |
|---|---|---|
| fieldName | String |
A String value that specifies the name of the data source field.
|
| Type | Description |
|---|---|
| Object |
An object that represents a value from the grid’s data source.
|
This method allows you to obtain any field value from the data source record to which the processed row corresponds. To obtain any field value in any data source record, 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.
wpf-data-grid-create-unbound-columns/CS/DXGrid_UnboundColumns_CodeBehind/Window1.xaml.cs#L13
if(e.IsGetData) {
int price = Convert.ToInt32(e.GetListSourceFieldValue(nameof(Product.UnitPrice)));
int quantity = Convert.ToInt32(e.GetListSourceFieldValue(nameof(Product.Quantity)));
wpf-data-grid-create-unbound-columns/VB/DXGrid_UnboundColumns_CodeBehind/Window1.xaml.vb#L17
If e.IsGetData Then
Dim price As Integer = Convert.ToInt32(e.GetListSourceFieldValue(NameOf(Product.UnitPrice)))
Dim quantity As Integer = Convert.ToInt32(e.GetListSourceFieldValue(NameOf(Product.Quantity)))
See Also