Move Grid Column After Initialization

2 posts, 1 answers
  1. Eric J at FADV
    Eric J at FADV avatar
    17 posts
    Member since:
    Oct 2012

    Posted 29 Mar 2016 Link to this post

    Is it possible to dynamically move a grid column from one position to another, and does doing so impact the underlying array sequence of dataItems? I need to basically swap the positon of two columns depending on user selection of options elsewhere on the form. OR as an alternative clear the columns and recreate them in the desired sequence. This only needs to be done once per page load.
  2. Answer
    Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 30 Mar 2016 Link to this post


    For achieving the desired result you have few options, but the one that I would suggest is to use the reorderColumn method of the grid:
    Although that the method will not swap the columns you can call the method for each column and simulate the swap.

    Hope this helps.

    Konstantin Dikov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top