Applying style to a grid view row

In the RowDataBound event of the grid view add this

e.Row.Style [ "border-top" ] = “3px solid Green”;

The code below applies the border style on all borders of the row.

e.Row.BorderStyle = BorderStyle.Solid;
e.Row.BorderWidth = new Unit(3);
e.Row.BorderColor = System.Drawing.Color.Green;

Advertisement

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.