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

Grid Column BackGround Color on Page Load..

1 Answer 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
raaj
Top achievements
Rank 1
raaj asked on 16 Oct 2010, 09:25 PM
Team,,

I'm binding Dynamically generated Datatable as a datasource to Radgrid with Autogeneratedcolumns set to True.
I need to apply a background color to a column of Radgrid at the page_load.
Is it possible?.  If possible just give me some sample code to implement.

Thanks in Advance

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Oct 2010, 06:00 AM
 Hello Rajesh,

The following code snippet will help to achive your requirement.

MarkUp:
<telerik:GridBoundColumn Uniquename="LastName" HeaderText="LastName"
</telerik:GridBoundColumn>

C#:
protected void Page_Load(object sender, EventArgs e)
    {
        RadGrid1.MasterTableView.GetColumn("LastName1").ItemStyle.BackColor = System.Drawing.Color.Red;
    }


Princy.
Tags
Grid
Asked by
raaj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or