Hi,
I've made a report whic uses a Cross-tab directly on page, as a Summary of a list. I would like to know how can I apply alternate design to each row. I mean, [row1-->white, row2-->blue, row3-->white, row4-->blue...].
Thanks for any hint.
Alternate row style
-
- Posts: 152
- Joined: Mon Aug 03, 2015 9:28 am
Re: Alternate row style
Hello.
You could use conditions to highlight the necessary row. But it's possible to check values of Columns and Rows like in next expression:
You could add as many Conditions as you need.
Thank you.
You could use conditions to highlight the necessary row. But it's possible to check values of Columns and Rows like in next expression:
Code: Select all
(sender as StiCrossSummary).CrossColumnValue == "4"
(sender as StiCrossSummary).CrossRowValue == "ANTON"
Thank you.
-
- Posts: 152
- Joined: Mon Aug 03, 2015 9:28 am
Re: Alternate row style
Hi Aleksey,
Thanks for the reply, it seems it's alm,ost what I want. Can I do something like:
Thanks in advance
Thanks for the reply, it seems it's alm,ost what I want. Can I do something like:
Code: Select all
i=(sender as StiCrossSummary).LineNumber
if(i %2==0) {
(sender as StiCrossSummary).row(i).color = #b0b0b0
}else{
(sender as StiCrossSummary).row(i).color = #000000)
}
Thanks in advance
Re: Alternate row style
Hello, Victor.
If you just need to change background of odd and even lines of the Cross-tab, you can to set the background of the Summary to one color and change it in ProcessCell event. Here is a sample code:
Thank you.
If you just need to change background of odd and even lines of the Cross-tab, you can to set the background of the Summary to one color and change it in ProcessCell event. Here is a sample code:
Code: Select all
if (e.Row % 2 == 0)
{
(sender as StiCrossSummary).Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Red);
};