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);
        }
Example #2
0
 void AddError(Dictionary <CardViewColumn, string> errors, CardViewColumn column, string errorText)
 {
     if (errors.ContainsKey(column))
     {
         return;
     }
     errors[column] = errorText;
 }
Example #3
0
    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;
        }
    }