Text Alignment

2 posts, 0 answers
  1. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 24 May 2011 Link to this post

    I have an odd question.  I have a radgird that I allow edit and insert here is a sample of a column

    <telerik:GridTemplateColumn HeaderText="Description" SortExpression="Description" UniqueName="Description"  >                                                       
          <ItemTemplate>                                                        
                   <asp:Label runat="server" ID="lbDescription" Text='<%# Eval("Description")%>'></asp:Label>
          </ItemTemplate>
          <EditItemTemplate>                                                        
                  <telerik:RadTextBox ID="tbDescription" Width="300px" TextMode="MultiLine" Text='<%# Eval("Description")%>'
                            runat="server" />
          </EditItemTemplate>
    </telerik:GridTemplateColumn>
      The problem is the label "Description:" is aligned vertical center on the RadTextBox.  Is there a way to align it Vertical Top?
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 26 May 2011 Link to this post

    Hello Eric,

    You could set a style for the column header as in the example below.

    <head runat="server">
      <title>....</title>
       ....
     
      <style type="text/css" >
      div.RadGrid th.class1
      {
          vertical-align:top
      }
      </style>
    </head>
     
    ......
    ......
     
    <telerik:GridTemplateColumn HeaderText="Description" SortExpression="Description" UniqueName="Description"  >                                                      
          <ItemTemplate>                                                       
                   <asp:Label runat="server" ID="lbDescription" Text='<%# Eval("Description")%>'></asp:Label>
          </ItemTemplate>
          <EditItemTemplate>                                                       
                  <telerik:RadTextBox ID="tbDescription" Width="300px" TextMode="MultiLine" Text='<%# Eval("Description")%>' runat="server" />
          </EditItemTemplate>
          <HeaderStyle CssClass="rgHeader class1"/>
    </telerik:GridTemplateColumn>

    Regards,
    Vasil
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top