Advertisement
HenX

Untitled

Dec 7th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1.     protected void postgrid_RowDataBound(object sender, GridViewRowEventArgs e)
  2.         {
  3.             if (e.Row.RowType == DataControlRowType.DataRow)
  4.             {
  5.                 PostItem p = (PostItem)e.Row.DataItem;
  6.  
  7.                 if (e.Row.RowIndex == 0)
  8.                 {
  9.                     e.Row.BackColor = Color.FromName("#ffe599");
  10.                     LinkButton lb = (LinkButton)e.Row.FindControl("deleteLink");
  11.                     lb.Visible = false;
  12.                 }
  13.                 else
  14.                 {
  15.                     e.Row.BackColor = Color.FromName("#fff2cc");
  16.                 }
  17.                 if (p.poster != "Martin Zwierzyna")
  18.                 {
  19.                     LinkButton lb = (LinkButton)e.Row.FindControl("deleteLink");
  20.                     lb.Visible = false;
  21.                 }
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement