Skip to main content
Tab

ASPxGridView.GetRowValuesByKeyValue(Object, String[]) Method

Returns the specified row’s values displayed within the specified columns (fields).

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public object GetRowValuesByKeyValue(
    object keyValue,
    params string[] fieldNames
)

Parameters

Name Type Description
keyValue Object

An object that uniquely identifies the row.

fieldNames String[]

The names of data source fields whose values are returned.

Returns

Type Description
Object

An object that contains the row values displayed within the specified columns (fields).

Example

The code sample below demonstrates how you can prohibit a user from editing data rows containing information unrelated to the Sales department.

string UserDepartment = "Sales";
...
protected void MyGridView_StartRowEditing(object sender, DevExpress.Web.Data.ASPxStartRowEditingEventArgs e) {
     if (MyGridView.GetRowValuesByKeyValue(e.EditingKeyValue, "Department").ToString() != UserDepartment) {
          e.Cancel = true;
     }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetRowValuesByKeyValue(Object, 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.

See Also