Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

ASP.net template field color and size

Hi

I am using the following markup in ASP.net to show a Gridview with 5 extra radio buttons. How do I change the markup to change the forecolor and size of each of the radio buttons
<asp:GridView ID="GridView1" runat="server" CellPadding="4" 
            ForeColor="#333333" GridLines="None" style="margin-top: 0px" Height="247px" 
                        Width="794px">  
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns> 
                <asp:TemplateField HeaderText="5. Strong">
                   <ItemTemplate>
                       <asp:RadioButton ID="RadioButton1" runat="server" />
                  </ItemTemplate>
               </asp:TemplateField> 
                      <asp:TemplateField HeaderText="4. Moderate">
                   <ItemTemplate>
                       <asp:RadioButton ID="RadioButton1" runat="server" />
                  </ItemTemplate>
               </asp:TemplateField> 
                      <asp:TemplateField HeaderText="3. Adequate">
                   <ItemTemplate>
                       <asp:RadioButton ID="RadioButton1" runat="server" />
                  </ItemTemplate>
               </asp:TemplateField> 
                      <asp:TemplateField HeaderText="2. Weaker">
                   <ItemTemplate>
                       <asp:RadioButton ID="RadioButton1" runat="server" />
                  </ItemTemplate>
               </asp:TemplateField> 
                         <asp:TemplateField HeaderText="1. Weakest">
                   <ItemTemplate>
                       <asp:RadioButton ID="RadioButton1" runat="server" />
                  </ItemTemplate>
               </asp:TemplateField> 
            </Columns> 
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />  
            <HeaderStyle BackColor="#003366" Font-Bold="True" ForeColor="White" />  
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />  
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />  
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />  
            <SortedAscendingCellStyle BackColor="#E9E7E2" />  
            <SortedAscendingHeaderStyle BackColor="#506C8C" />  
            <SortedDescendingCellStyle BackColor="#FFFDF8" />  
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />  
        </asp:GridView>

Open in new window

0
Murray Brown
Asked:
Murray Brown
1 Solution
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Hello, just play with the ForeColor, Width and Height properties of each RadioButton, example:
<asp:RadioButton ID="RadioButton1" runat="server" ForeColor="Blue" Width="100px" Height="40px" />

Open in new window

0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now