ASP.net GridView Template Column text box border. Remove or change to white

Murray Brown
Murray Brown used Ask the Experts™
on
Hi
I have the following GridView with TextBoxes. How do I remove the TextBox border in each cell or change it to white?
Thanks

        &nbsp;<asp:GridView ID="GridView1" runat="server" CssClass="Grid" OnSelectedIndexChanged="SelectedIndexChanged" HeaderStyle-CssClass="header" AllowSorting="True" AutoGenerateColumns="False" >
                    <HeaderStyle CssClass="header"  />
                 <Columns>
                      <asp:TemplateField HeaderText="Employee ID" Visible="true" ItemStyle-Wrap="true">
                           <ItemTemplate>
                                <asp:Label ID="lblEmployeeID" runat="server" Text='<%# Bind("EmployeeID")%>' Visible="true"></asp:Label>
                           </ItemTemplate>
                      </asp:TemplateField>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Developer User Interface
Commented:
Add this to your css file.

.Grid tbody tr td input.text
{
border : none;
border-width: 0px;
}

Open in new window


By the way, you have added the code that would display a label and not textboxes. Are your textboxes getting generated from code-behind?
Murray BrownASP.net/VSTO Developer

Author

Commented:
Great answer! I didn't realise  that I only showed the labels but the textbox columns are very similar

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial