PDA

Click to See Complete Forum and Search --> : Format a datagrid??


venerable bede
Nov 1st, 2002, 04:38 AM
There seems to be no TableStyles object in the properties pane for a datagrid (Web) so how do I format the header, contents e.t.c.

Do I have to do it in code?

Does anyone have any ideas how to go about this?

Thanks in Advance

Negative0
Nov 3rd, 2002, 09:24 PM
If you have the VS.Net editor, you can use the property builder in the right click menu to build up the format of items in the grid. Here is an example of the code, if you do not have the editor:

<form id="Form1" method="post" runat="server">
<asp: DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 109px; POSITION: absolute; TOP: 88px" runat="server" Width="396px" Height="136px">
<ItemStyle ForeColor="Black" BackColor="Silver"></ItemStyle>
<HeaderStyle Font-Size="Small" Font-Underline="True" Font-Names="Tahoma" Font-Bold="True" HorizontalAlign="Center" ForeColor="Black" VerticalAlign="Middle" BackColor="LightGreen"></HeaderStyle>
</asp: DataGrid>
</form>

Hope this helps,