Skip to main content
Tab

ASPxGridView.GetMasterRowFieldValues(String[]) Method

Returns the values within the specified master row cells.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

NuGet Package: DevExpress.Web

#Declaration

public object GetMasterRowFieldValues(
    params string[] fieldNames
)

#Parameters

Name Type Description
fieldNames String[]

The names of data source fields whose values are returned.

#Returns

Type Description
Object

An object that contains the specified master row cell values.

#Remarks

A detail row is displayed when its corresponding master row is expanded. Use the detail grid’s GetMasterRowFieldValues method to obtain values within the specified master row cells.

GetMasterRowValues

#Example

This example shows how to determine a composite key of a master record.NOTE: Starting from v2009 vol 1, the ASPxGridView supports composite keys out-of-the-box: Support for the composite key is requiredYou can use semicolon-separated values to specify multi-field keys: "column1[;columnx]". For example: "FirstName;LastName;Phone;BirthDate".

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.1" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.1" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <dxwgv:ASPxGridView runat="server" ID="grid" EnableRowsCache="false" KeyFieldName="__Key"
            OnLoad="grid_Load"
            OnCustomUnboundColumnData="grid_CustomUnboundColumnData" >
            <Columns>
                <dxwgv:GridViewDataTextColumn FieldName="FirstName" VisibleIndex="0" />
                <dxwgv:GridViewDataTextColumn FieldName="LastName" VisibleIndex="1" />
                <dxwgv:GridViewDataTextColumn FieldName="__Key" Visible="False" UnboundType="String" />
            </Columns>
            <SettingsDetail ShowDetailRow="True" />
            <Templates>
                <DetailRow>
                    <dxwgv:ASPxGridView runat="server" ID="detail" EnableRowsCache="false"
                        OnDataBinding="detail_DataBinding">
                        <SettingsDetail IsDetailGrid="true" />
                    </dxwgv:ASPxGridView>
                </DetailRow>
            </Templates>
        </dxwgv:ASPxGridView>
    </form>
</body>
</html>
See Also