ASPxGridView.GetRowValuesByKeyValue(Object, String[]) Method
Returns the specified row’s values displayed within the specified columns (fields).
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v21.2.dll
NuGet Package: DevExpress.Web
Declaration
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;
}
}
See Also