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

Access row and change color

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 26 Dec 2013, 02:47 PM
Hi all, 
How to change the color,  I mean background color ok the row,  after accessing the row. 

Please provide a solution... 

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 26 Dec 2013, 02:56 PM
Hi Ryan,

I'm not clear about your requirement , please go through this documentation on Accessing Cells and Rows. In order to set background color please try using CSS.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
   {
     GridDataItem data = (GridDataItem)e.Item;
     data["ColumnUniqueName"].CssClass = "color";
   }
}

Thanks,
Princy
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or