This is a migrated thread and some comments may be shown as answers.

Possible alternate color for RadGrid row?

2 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saint
Top achievements
Rank 1
Saint asked on 17 Jul 2008, 07:56 AM
Hi,

I found that in winforms, there is a function that can set an alternating background color for every odd row by using the IsOdd property of GridRowElement. 

void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
    if (e.RowElement.IsOdd)
    {
        e.RowElement.DrawFill = true;
        e.RowElement.BackColor = Color.Red;
    }
    else
        e.RowElement.DrawFill = false;
}

Is it possible to set it in web forms as well? If do so, please give me some sample.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 Jul 2008, 08:02 AM
Hi Saint,

You can set the AlternatingItemStyle for the Grid . Go through the following help article for more details.
Customizing row appearance

Thanks
Shinu.
0
Saint
Top achievements
Rank 1
answered on 17 Jul 2008, 08:36 AM
Hi Shinu,

Thanks a lot. You really help me.
Tags
Grid
Asked by
Saint
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Saint
Top achievements
Rank 1
Share this question
or