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

Column reordering & row templates for grids

1 Answer 371 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 05 Jun 2012, 02:44 PM
Does anyone have any ideas about how to use column reordering and row templates for a grid? The problem I'm running into is that after the columns have been reordered and the user goes to the next page of data in the grid, the columns headers don't match the data.

Is there some way to access the column order in the template to adjust the order of the columns in the template?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 08 Jun 2012, 07:32 AM
Hi Brian,

The cause for the behaviour that you experiencing is that the grid is changing the column order, but cannot modify with the custom defined row html.

When you are using rowTemplate, you have to handle the template html change manually. To achieve this you could use JavaScript inside the template definition, for convenience I prepared a small example that illustrates this approach.




Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or