change color of text in crosstab value by another value
Posted: Tue Feb 22, 2011 1:52 pm
In cross tab there is bound value from dataset called xyDS and in tag there is bound name of color (also from dataset). I want to change color of value by the name of color in tag.
Dataset looks like
Column string
Row string
Value int
Color string
If I use (without using tag, just directly from dataset)
public void CrossTab1_Sum1_GetCrossValue(object sender, Stimulsoft.Report.CrossTab.StiGetCrossValueEventArgs e)
{
this.CrossTab1_Sum1.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromName(xyDS.Color));
}
then the color of all cells (values) is changed by the color in latest record in dataset.
If I use
public void CrossTab1_Sum1_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
((StiText)sender).TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromName(((StiComponent)sender).Tag.ToString()));
}
nothing happen.
Is there any way to change color of text cell by cell ?
Dataset looks like
Column string
Row string
Value int
Color string
If I use (without using tag, just directly from dataset)
public void CrossTab1_Sum1_GetCrossValue(object sender, Stimulsoft.Report.CrossTab.StiGetCrossValueEventArgs e)
{
this.CrossTab1_Sum1.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromName(xyDS.Color));
}
then the color of all cells (values) is changed by the color in latest record in dataset.
If I use
public void CrossTab1_Sum1_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
((StiText)sender).TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromName(((StiComponent)sender).Tag.ToString()));
}
nothing happen.
Is there any way to change color of text cell by cell ?