This is a migrated thread and some comments may be shown as answers.
Grid Edit Form Alignment
5 Answers 48 Views
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 20 Jan 2011, 04:10 PM
 I have two columns one a bound column and one a template column. The alignment of the template data column is left of the bound column

<
telerik:GridBoundColumn DataField="First Name" 
    FilterControlAltText="Filter First Name column" HeaderText="First Name" 
    SortExpression="First Name" UniqueName="First Name">
    <ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="First Name" UniqueName="First Name">
      <EditItemTemplate>
       <telerik:RadTextBox id="tbFirstName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "First Name") %>'></telerik:RadTextBox>
       <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="(Required)"
        ControlToValidate= "tbFirstName" ForeColor="Red"> </asp:RequiredFieldValidator>
      </EditItemTemplate>
    <ItemStyle HorizontalAlign="Left" />
<ItemTemplate>  
    <asp:Label ID="dtFirst_Name" runat="server" Text='<%# Eval("First Name", "{0}") %>' />  
</ItemTemplate>  
</telerik:GridTemplateColumn>
How can I make these line up?
Thanks

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 21 Jan 2011, 10:41 AM
Hello Ken,

I suppose you want to show all the controls in same line. Try setting EditMode to "InPlace".

aspx:
<telerik:RadGrid ID="RadGrid1" runat="server>
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="EmployeeID" EditMode="InPlace">
. . . . . . . . . . . . . .

Thanks,
Shinu.
0
Ken
Top achievements
Rank 1
answered on 24 Feb 2011, 08:19 PM
See attached... EditMode is EditForm
I would like the different size text boxes to align left.
Also any other like combo box or dates to also align left even if different sizes

Thanks
0
Pavlina
Telerik team
answered on 25 Feb 2011, 01:57 PM
Hello Ken,

Give a try with the following code and see whether it helps to align the textboxes to left:
CSS:
<style type="text/css">
       .rgEditForm td div
       {
           text-align: left;
       }
   </style>

Best wishes,
Pavlina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Ken
Top achievements
Rank 1
answered on 08 Mar 2011, 02:45 PM
I add this and it work ok for combobox and text but not for datetimepicker see attached

.rgEditForm td div

{

display: block;

text-align: left;

}

0
Pavlina
Telerik team
answered on 11 Mar 2011, 01:05 PM
Hello Ken,

Could you paste your complete aspx and code-behind?

Kind regards,
Pavlina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Ken
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or