private void gridViewAppointments_CustomRowFilter(object sender, DevExpress.XtraGrid.Views.Base.RowFilterEventArgs e) { if (ShowResources && selectedResourceId != null) { Appointment sourceAppointment = ((sender as ColumnView).GetRow(e.ListSourceRow) as AgendaAppointment).SourceAppointment; e.Visible = sourceAppointment.ResourceIds.Contains(selectedResourceId); e.Handled = true; } }
private void gridView1_CustomRowFilter(object sender, DevExpress.XtraGrid.Views.Base.RowFilterEventArgs e) { ColumnView view = sender as ColumnView; string id = view.GetListSourceRowCellValue(e.ListSourceRow, "ID").ToString(); if (id == "admin") { e.Visible = false; e.Handled = true; } }