Grid Group Header

3 posts, 0 answers
  1. tin
    tin avatar
    2 posts
    Member since:
    Oct 2015

    Posted 28 Oct 2015 Link to this post

    Hi,

     Is there a way to enable groupable: true after a grid was created?

        

     Thks

  2. tin
    tin avatar
    2 posts
    Member since:
    Oct 2015

    Posted 28 Oct 2015 in reply to tin Link to this post

    More specific, the grid is not groupable at first time. But I need to enable grid's groupable it after click button or sth similiar
  3. Eyup
    Admin
    Eyup avatar
    3819 posts

    Posted 02 Nov 2015 Link to this post

    Hello Tin,

    You can use the following approach to achieve this requirement:
    <asp:CheckBox ID="CheckBox1" runat="server" onclick="checkBoxClick(this);" />
    <telerik:RadGrid ... ShowGroupPanel="true">
        <ClientSettings AllowDragToGroup="true">
    JavaScript:
    function pageLoad(app, args) {
        toggleGrouping();
    }
    function checkBoxClick(checkBox) {
        toggleGrouping();
    }
    function toggleGrouping() {
        var grid = $find('<%= RadGrid1.ClientID %>');
        var checkBox = $get('<%= CheckBox1.ClientID %>');
        grid.ClientSettings.AllowDragToGroup = checkBox.checked;
    }

    Hope this helps. Please give it a try and let me know if it works for you.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top