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

GridTemplateColumn Reording

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vinodh B
Top achievements
Rank 1
Vinodh B asked on 20 Aug 2012, 02:18 PM
Hi

i have two GridTemplateColumn  for submit button & Reject button . Am ordering the column  seq from codebehind . My problem is column header is changed but data remain static. In attached image the cancel button should come first then submit button but its vice versa.



 <telerik:GridTemplateColumn Visible="true" UniqueName="imgbtnFirst" AllowFiltering="false">
                    <ItemTemplate>
                        <asp:ImageButton  ID="imgbtnFirst" runat="server" OnClick="btnFirstOnClick" Width="15px"
                            Height="15px" ImageUrl='<%# Eval("stsflg").ToString() =="S" ? "../../IMages/MoveDown.gif" :"../../IMages/Cancel.gif"%>'
                            ToolTip='<%# Eval("stsflg").ToString() =="S" ? "Reject" :"Cancel"%>' />
                    </ItemTemplate>
                    <HeaderStyle Width="30px" HorizontalAlign="Center" />
                    <ItemStyle Width="30px" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Visible="true" AllowFiltering="false" UniqueName="imgbtnSecond">
                    <ItemTemplate>
                        <asp:ImageButton ID="imgbtnSecond" runat="server" OnClick="btnSecondOnClick" Width="15px"
                            Height="15px" ImageUrl='<%# Eval("stsflg").ToString() =="S" ? "../../IMages/MoveUp.gif" :"../../IMages/Submit.gif"%>'
                            ToolTip='<%# Eval("stsflg").ToString() =="S" ? "Approve" :"Submit for Approval"%>' />
                    </ItemTemplate>
                    <HeaderStyle Width="30px" HorizontalAlign="Center" />
                    <ItemStyle Width="30px" />
                </telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 22 Aug 2012, 11:15 AM
Hello Vinodh,

I have created a sample RadGrid web site using the provided code to test the described behavior. On my side everything works as expected and the content gets swapped correctly. Please check out the attached application and try to distinguish the crucial differences between our projects.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Vinodh B
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or