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

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

1 Answer 125 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Donny
Top achievements
Rank 1
Donny asked on 17 Jun 2016, 01:21 PM

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>

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 22 Jun 2016, 08:00 AM
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.
Tags
DropDownList
Asked by
Donny
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or