Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void postgrid_RowDataBound(object sender, GridViewRowEventArgs e)
- {
- if (e.Row.RowType == DataControlRowType.DataRow)
- {
- PostItem p = (PostItem)e.Row.DataItem;
- if (e.Row.RowIndex == 0)
- {
- e.Row.BackColor = Color.FromName("#ffe599");
- LinkButton lb = (LinkButton)e.Row.FindControl("deleteLink");
- lb.Visible = false;
- }
- else
- {
- e.Row.BackColor = Color.FromName("#fff2cc");
- }
- if (p.poster != "Martin Zwierzyna")
- {
- LinkButton lb = (LinkButton)e.Row.FindControl("deleteLink");
- lb.Visible = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement