How to change Group SortOrder dyanmically?

3 posts, 1 answers
  1. Liu Peng
    Liu Peng avatar
    18 posts
    Member since:
    Oct 2006

    Posted 11 Mar 2009 Link to this post


    In my project I add a image on column's header to let user group or ungroup current column, in the same time I add some javascript to call Grid's client API fireCommand("UnGroupByColumn", "") and fireCommand("GroupByColumn", "") on these image's click event, when I click one columns' groupping image, grid will group or ungroup on this column.

    Currently groupping image's behavior is: [Group] -> [UnGroup] -> [Group] -> ..., Now, I want to midify their behavior with: [Group ascending] -> [Group descending] -> [UnGroup]
    So, how I can implement this function?

    I hope Grid's fireCommand can support the following function:
    fireCommand("GroupByColumn", "ContactName DESC");

  2. Answer
    Tsvetoslav avatar
    1823 posts

    Posted 13 Mar 2009 Link to this post

    Hello Liu Peng,

    Thank you for contacting us and for your question.

    I am afraid that the fireCommand method does not support such a functionality.

    The best way to achieve the implementation you are considering is to use the AjaxManager ajaxRequest client method and handler your group by expressions on the server.

    For your convenience, I am sending you a small sample demonstrating how to achieve that.

    Please, use it for comparison with your implementation and let me know if I can help you further.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft R3 2016 release webinar banner
  4. Liu Peng
    Liu Peng avatar
    18 posts
    Member since:
    Oct 2006

    Posted 16 Mar 2009 Link to this post

    Hello Tsvetoslav,

    Thanks for you help, I have completed my request using the AjaxManager ajaxRequest client method.

Back to Top