Skip to main content
Tab

ASPxCardView.GetCardValuesByKeyValue(Object, String[]) Method

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

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

Parameters

Name Type Description
keyValue Object

An object that uniquely identifies the card.

fieldNames String[]

The names of data source fields whose values are returned.

Returns

Type Description
Object

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

Example

The code example below prohibits a user from editing cards that contain information unrelated to the Sales department.

string UserDepartment = "Sales";
...
protected void ASPxCardView1_StartCardEditing(object sender, DevExpress.Web.ASPxStartCardEditingEventArgs e)
{
    if (ASPxCardView1.GetCardValuesByKeyValue(e.EditingKeyValue, "Department").ToString() != UserDepartment) {
    e.Cancel = true;
}
See Also