This is a migrated thread and some comments may be shown as answers.

Text Alignment

1 Answer 207 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Klein
Top achievements
Rank 1
Eric Klein asked on 24 May 2011, 02:30 PM
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?

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 26 May 2011, 01:51 PM
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.

Tags
Grid
Asked by
Eric Klein
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or