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

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

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

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Developer User Interface
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 Developer


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