Setting Border During ItemDataBound

4 posts, 0 answers
  1. bdk0172
    bdk0172 avatar
    50 posts
    Member since:
    Oct 2006

    Posted 29 Apr 2010 Link to this post

    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");

     

  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 29 Apr 2010 Link to this post

    I would suggest setting this properties in the PreRender event of the grid.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. bdk0172
    bdk0172 avatar
    50 posts
    Member since:
    Oct 2006

    Posted 29 Apr 2010 Link to this post

    That doesn't work either.  Thanks for the reply though.
  5. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 29 Apr 2010 Link to this post

    Why do you use Unit.Parse("10px"), instead of Unit.Pixel(10)? Perhaps that is the reason.
Back to Top