Move the dropdown arrow in a RadGrid from the left side to the right.

2 posts, 0 answers
  1. Donny
    Donny avatar
    1 posts
    Member since:
    Jun 2016

    Posted 17 Jun Link to this post

    Is there a way to move the drop down arrow in a RadGrid GridBoundColumn from the first position to the last position in the row? I don't even see where that is generated in the RadGrid code.

    Here is the code

    <telerik:RadGrid Skin="CustomSkin" EnableEmbeddedSkins="False" ID="dgSearchUsers"
    runat="server" EnableAJAX="True" AllowFilteringByColumn="False" AllowSorting="True"
    OnNeedDataSource="dgSearchUsers_NeedDataSource" AutoGenerateColumns="False">
    <MasterTableView DataKeyNames="UserId" HierarchyLoadMode="Client" AllowPaging="True" PageSize="25">
    <PagerStyle HorizontalAlign="Center" CssClass="grdPagerStyle" Mode="NextPrevAndNumeric" >
    </PagerStyle>
    <DetailTables>
    <telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="PlayerId" Name="PlayerDetails"
    Width="96%" AllowPaging="False" AllowFilteringByColumn="false">
    <ParentTableRelation>
    <telerik:GridRelationFields DetailKeyField="UserId" MasterKeyField="UserId"></telerik:GridRelationFields>
    </ParentTableRelation>
    <Columns>
    <telerik:GridBoundColumn HeaderText="Player First Name" DataField="PlayerFirstName"
    UniqueName="PlayerFirstName">
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="Player Last Name" DataField="PlayerLastName"
    UniqueName="PlayerLastName">
    </telerik:GridBoundColumn>
    </Columns>
    </telerik:GridTableView>
    </DetailTables>
    <Columns>
    <telerik:GridTemplateColumn HeaderText="" UniqueName="Select" AllowFiltering="False">
    <ItemTemplate>
    <asp:CheckBox ID="chkSelect" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem,"IsSelected")%>'>
    </asp:CheckBox>
    </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridBoundColumn HeaderText="User First Name" DataField="UserFirstName" UniqueName="UserFirstName">
    <ItemStyle HorizontalAlign="Left" />
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="User Last Name" DataField="UserLastName" UniqueName="UserLastName">
    <ItemStyle HorizontalAlign="Left" />
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="User Name" DataField="UserName" UniqueName="UserName">
    <ItemStyle HorizontalAlign="Left" />
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn HeaderText="Email" DataField="Email" UniqueName="Email">
    <ItemStyle HorizontalAlign="Left" />
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn Display="false" HeaderText="UserId" DataField="UserId" UniqueName="UserId">

    </telerik:GridBoundColumn>
    </Columns>
    </MasterTableView>
    <HeaderStyle Width="200px" />
    <GroupingSettings CaseSensitive="false" />
    <ClientSettings AllowExpandCollapse="True">
    <Resizing EnableRealTimeResize="false" AllowColumnResize="false"></Resizing>
    </ClientSettings>
    </telerik:RadGrid>

     

  2. Eyup
    Admin
    Eyup avatar
    3013 posts

    Posted 22 Jun Link to this post

    Hello Donny,

    I believe you are using grid hierarchy and want to move the expand/collapse command in the last place:
    http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

    You can achieve this requirement by hiding the autogenerated expand column:
    <telerik:RadGrid ... MasterTableView-ExpandCollapseColumn-Visible="false">

    And adding your own in the end of the columns collection:
    <telerik:GridExpandColumn UniqueName="NewExpandColumn">
    </telerik:GridExpandColumn>

    I hope this will prove helpful.

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top