tags:

views:

115

answers:

2

If I were writing my own HTML and placing the values in the table I would use css and style the borders using something like:

td{
     border-left : solid gray 1px;
}
+2  A: 

if you put that css style into your web page, you'll find that your datagrid will use it, since the datagrid control just generates a html table!

of course, you can set the CssClass of the datagrid and make a style just for it as well; you can also fiddle with the row-style properties of the datagridview but css styling is much easier to change/skin later

Steven A. Lowe
Is this the 'ASP.NET' way of making gridlines or is there a more ASP.NET way of achieving this look?
minty
@minty: the asp.net grid control generates a html table on the client side, format it however you like with css, it is very simple. If you would rather set server-side properties (much harder to change later) look at the row-style objects in the property grid
Steven A. Lowe
+1  A: 

You might try using the gridrowstyle & alternatinggridrowstyle properties of the datagrid. i would suggest setting them to a CSS class as Steven suggests.

deadbug