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

Grid Column Reorder - Hierarchy

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ramesh
Top achievements
Rank 1
Ramesh asked on 12 Sep 2010, 06:24 PM
Hi,

I am facing problem in re-ordering columns in self-referencial hierarchical mode in AJAX-GRID.
When I swap 2 columns, only the values at the highest level are swapped, but values in both columns at different levels are not getting swapped. Could anyone help in this regard.
For my project, I wanted swapping of column-headers, included with values of columns at different levels in grid-hierarchy, needs to happen, when I swap any 2 columns.
And want to store the orderIndex of the swapped columns in database.

Thanks in advance.

Ramesh

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 15 Sep 2010, 12:11 PM
Hello Ramesh,

In order to achieve your goal, you need to manually swap the columns in the nested levels. For that purpose you need to handle the OnColumnSwapped or OnColumnMovedToLeftOnColumnMovedToRight client-side event depending on the Reorder method you have. Then you can use the below methods to reoder the columns in the nested table views:

http://www.telerik.com/help/aspnet-ajax/grid_get_detailtables.html
http://www.telerik.com/help/aspnet-ajax/grid_swapcolumns.html
http://www.telerik.com/help/aspnet-ajax/grid_reordercolumnsindex1index2.html

Regards,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Ramesh
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or