Results 1 to 2 of 2

Thread: changing color of a datagrid column

  1. #1

    Thread Starter
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256

    changing color of a datagrid column

    Does anyone know how to change the color of a datagrid column.


    Thanks

    Jeff

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Fishburn
    Posts
    45
    The simplest way is using the property builder. In DESIGN view, right click the datagrid, and choose, PROPERTY BUILDER.

    Choose Format ->
    Columns ->
    Pick the column you're interested ->
    Pick Items ->
    Then you can change the specific properties for items displayed in that column.

    Or in HTML code you can use for example...

    Code:
       <asp:DataGrid id="DataGrid1" runat="server">
          <Columns>
             <asp:ButtonColumn>
                <ItemStyle BackColor="LightCoral"></ItemStyle>         
             </asp:ButtonColumn>
             <asp:ButtonColumn>
                <ItemStyle BackColor="Bisque"></ItemStyle>
             </asp:ButtonColumn>
          </Columns>
       </asp:DataGrid>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width