Change DataGroups Dynamically

Thread is closed for posting
1 posts, 0 answers
  1. Marin Bratanov
    Marin Bratanov avatar
    23 posts
    Member since:
    Jul 2012

    Posted 16 Jul 2018 Link to this post

    Requirements

    Telerik Product and Version

    UI for ASP.NET AJAX Q3 2013 and later (that supports data grouping)

    Supported Browsers and Platforms

    All browsers supported by your current Telerik UI for ASP.NET AJAX version

    Components/Widgets used (JS frameworks, etc.)

    Telerik UI for ASP.NET AJAX

    PROJECT DESCRIPTION 
    The samples attached below show how you can alter the DataGroups collection dynamically on the server.

    There are a few important aspects to this:

    • this changes the control structure, so such changes must generally be done in the Page_Init event, and in every subsequent Page_Init to allow the control tree to be properly loaded
    • you need to toggle the item placeholder ID according to your business logic and the current structure you have every time you change the groups
    • you need to rebind the listview in order for the grouping changes to take effect because grouping is performed at the data source level

    Related resources:

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.