Skip to main content
A newer version of this page is available. .

How to: Prohibit a User from Editing Cards Containing Specific Information

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;
}