Update & Cancel button alignment

2 posts, 1 answers
  1. io
    io avatar
    6 posts
    Member since:
    Jan 2020

    Posted 30 Jan Link to this post



    I have a radgrid table configured in my ASP application. When it is in Edit mode (EditForms), it displays two dropdown columns and the Update & Cancel options at the left of the table, is there anyway to move the buttons to the right side?

    Im able to move the dropdown columns to the right with the code:

    <EditFormSettings  FormTableStyle-HorizontalAlign="Right" FormTableButtonRowStyle-HorizontalAlign="Right" ></EditFormSettings>

    but Im unable to move the buttons.


    Here is the code of my grid

    <telerik:RadGrid ID="rgDetalles" runat="server" GroupingSettings-CaseSensitive="false"  AllowPaging="True" RenderMode="Lightweight"
                                AllowSorting="true" AllowFilteringByColumn="True"  PageSize="10" OnNeedDataSource="rgDetalles_NeedDataSource" OnItemCommand="ItemCommands" OnItemDataBound="rgDetalles_ItemDataBound"
                                    CssClass="RadGrid_Silk" EnableHeaderContextMenu="true" GridLines="Horizontal" Width="100%" AllowAutomaticDeletes="True" AllowAutomaticInserts="False" AllowAutomaticUpdates="False" MasterTableView-EditFormSettings-FormTableButtonRowStyle-HorizontalAlign="Right">
                                <HeaderContextMenu Enabled="false"></HeaderContextMenu>
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="Folio" ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" NoMasterRecordsText="<%$ Resources:Language, lbl_tablaVacia %>" CommandItemDisplay="Top">
                                    <EditFormSettings  FormTableStyle-HorizontalAlign="Right" FormTableButtonRowStyle-HorizontalAlign="Right" ></EditFormSettings>
                                    <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" AddNewRecordText="" RefreshText="<%$ Resources:Language, lbl_actualizar %>"/>

  2. Answer
    Vessy avatar
    2301 posts

    Posted 04 Feb Link to this post

    Hi Guillermo,

    Edit Form command buttons does not have its own wrapper and are relatives to the EditForm table, so even if you float:right the buttons they will also appear on the left side of the table, as they are declared after it (in can the alignment of both elements is set to "Right"). In order to style the EditForm of the Grid in the desired way at the moment is to use either a custom FormTemplate, or a custom Edit form User control, specifying the exact editing structure in it. You can see live demos demonstrating both of the suggested settings here:

    Progress Telerik

    Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Back to Top