I am using a PivotGrid(DevExpress). I want to set AppearancePrint property settings in a for loop.
How do i use the variable type for properties such as Cell in the example below?
so instead of
grid.AppearancePrint.Cell.BackColor = Color.White;
grid.AppearancePrint.Cell.BackColor2 = Color.LightBlue;
I want to do this:
//datarow example <PrintAppearance Type="Cell" Font="Tahoma,8,Regular" BackColor="White" BackColor2="Light Grey"/>
foreach (DataRow dr in appearances)
{
string type = dr["Type"].ToString();
grid.AppearancePrint.[type].BackColor = Color.FromName(dr["BackColor"].ToString());
grid.AppearancePrint.[type].BackColor2 = Color.FromName(dr["BackColor2"].ToString());
}