Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

Shifting gridview headers to the left

I have a gridview (sceenshot attached). You see how the header is shifted to the right. I used controlstyle css to move it to the left but doesnt look like that's the correct one...

How can I do this? Part of the grid code is also below
<asp:TemplateField    HeaderText="User Name">
           <ItemTemplate  >
              <asp:Label ID="Labelx" runat="server" Text='<%# Eval("Username") %>' >
		        </asp:Label>
           </ItemTemplate>
           <EditItemTemplate >
               <asp:TextBox ID="txtUserName" runat="server" Text='<%# Eval("Username")%>'  ></asp:TextBox>
               <span class="feedback"><asp:RequiredFieldValidator ControlToValidate="txtUserName" runat="server" ID="rfv1" Text="User Name is required!" ErrorMessage="User Name is required!"></asp:RequiredFieldValidator></span>
           </EditItemTemplate>
               </asp:TemplateField>
           <asp:TemplateField  HeaderText="Business Name">
           <ItemTemplate>
               <asp:Label ID="Label1" runat="server" Text='<%# Eval("BusinessName") %>'></asp:Label>
           </ItemTemplate>
          
           </asp:TemplateField>

Open in new window

Doc3.docx
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

<asp:TemplateField HeaderText="User Name" HeaderStyle-HorizontalAlign="Left">
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial