This is a migrated thread and some comments may be shown as answers.

Grid Group Header

2 Answers 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
tin
Top achievements
Rank 1
tin asked on 29 Oct 2015, 12:49 AM

Hi,

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

    

 Thks

2 Answers, 1 is accepted

Sort by
0
tin
Top achievements
Rank 1
answered on 29 Oct 2015, 12:51 AM
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
0
Eyup
Telerik team
answered on 02 Nov 2015, 03:43 PM
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
Tags
Grid
Asked by
tin
Top achievements
Rank 1
Answers by
tin
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or