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

Setting Border During ItemDataBound

3 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bdk0172
Top achievements
Rank 1
bdk0172 asked on 29 Apr 2010, 01:48 PM

I'm setting the following properties during OnItemDataBound event, but it doesn't seem to change anything.  Is there something else I need to do?  I can set the BackColor and ForeColor for an entire row during the event and be able to see the change, but when I set anything with Border, it doesn't change anything,

e.Item.BorderColor =

Color.Red;

 

e.Item.BorderStyle =

BorderStyle.Groove;

 

e.Item.BorderWidth =

Unit.Parse("10px");

 

3 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 29 Apr 2010, 02:17 PM
I would suggest setting this properties in the PreRender event of the grid.

I hope that helps.
0
bdk0172
Top achievements
Rank 1
answered on 29 Apr 2010, 03:30 PM
That doesn't work either.  Thanks for the reply though.
0
robertw102
Top achievements
Rank 1
answered on 29 Apr 2010, 07:30 PM
Why do you use Unit.Parse("10px"), instead of Unit.Pixel(10)? Perhaps that is the reason.
Tags
Grid
Asked by
bdk0172
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
bdk0172
Top achievements
Rank 1
Share this question
or