private static void AddColumn(ASPxCardView cardView, string fieldName, Type fieldType) { Type colType = columnMap.ContainsKey(fieldType) ? columnMap[fieldType] : typeof(CardViewTextColumn); CardViewColumn c = Activator.CreateInstance(colType) as CardViewColumn; c.FieldName = fieldName; cardView.Columns.Add(c); }
void AddError(Dictionary <CardViewColumn, string> errors, CardViewColumn column, string errorText) { if (errors.ContainsKey(column)) { return; } errors[column] = errorText; }
protected void ASPxCardViewExporter1_RenderBrick(object sender, DevExpress.Web.ASPxCardViewExportRenderingEventArgs e) { CardViewColumn dataColumn = e.Column as CardViewColumn; if (dataColumn != null && dataColumn.FieldName == "ProductName") { e.BrickStyle.ForeColor = (decimal)e.GetValue("UnitPrice") > 10 ? Color.Green : Color.Red; e.BrickStyle.BackColor = Color.LightYellow; } }