ASPxClientGridView.GetSelectedFieldValues(fieldNames, onCallback) Method

Returns the row values displayed within all selected rows.


    fieldNames: string,
    onCallback: ASPxClientGridViewValuesCallback
): void


Name Type Description
fieldNames string

The names of data source fields separated via a semicolon, whose values within the selected rows are returned.

onCallback ASPxClientGridViewValuesCallback

A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter.


The GetSelectedFieldValues method sends a callback to the server to obtain the required field values and passes them back to the client. These values are received by the JavaScript function specified by the onCallback parameter.

  • The GetSelectedFieldValues property is not in effect if cell merging is enabled.
  • The GetSelectedFieldValues method returns column values only. So, if a grid is bound to a collection of complex objects (for example, KeyFieldName="Product.Category.CategoryName"), create a hidden column for this complex field. The grid does not render hidden columns, but allows you to get their data on the server side.

    MVC approach:

    settings.Columns.Add("SubRegionInfo.ID").Visible = false;

    Web Forms approach:

    ASPxGridView1.Columns.Add("SubRegionInfo.ID").Visible = false;


Web Forms approach:


For a full example, see the ASPxGridView - Selection Using Checkboxes (Web Forms) demo.

<dx:ASPxListBox ID="ASPxListBox1" ClientInstanceName="selList" runat="server" Height="250px" Width="100%" />
<dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" DataSourceID="CustomersDataSource" 
    KeyFieldName="CustomerID" Width="100%">
    <ClientSideEvents SelectionChanged="grid_SelectionChanged" />

MVC approach:


For a full example, see the GridView - Row Selection (MVC) demo.

@Html.DevExpress().ListBox(settings => {
    settings.Name = "SelectedRows";
    settings.Width = Unit.Percentage(100);
    settings.Height = 250;
    settings.Properties.EnableClientSideAPI = true;
    settings.Theme = "MaterialCompactOrange";



See Also