Column reordering & row templates for grids

2 posts, 0 answers
  1. Brian
    Brian avatar
    4 posts
    Member since:
    Jan 2012

    Posted 05 Jun 2012 Link to this post

    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?
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 08 Jun 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top