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

[Solved] How to disable AllowDragToGroup for specific column or template

1 Answer 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mihir Pathak
Top achievements
Rank 1
Mihir Pathak asked on 03 Mar 2010, 10:27 PM
Hi,

In my grid I have set ShowGroupPanel to true and under ClientSetting AllowDragToGroup is also set to true. In my grid I have simple templete which contains Hyperlink. I want to disable AllowDragToGroup for this column. Is that possible?

Thanks
MP

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Mar 2010, 05:40 AM
Hi Mihir Pathak,

You can easily disable the grouping for any particular column by checking with the ColumnUniqueName in OnCommand client event of grid. Here is the example.

javascript:
 
<script type="text/javascript"
    function OnCommand(sender, args) { 
        if (args.get_commandName() == "GroupByColumn" && args.get_commandArgument() == "TempColumnUniqueName") { 
            args.set_cancel(true); // Cancel the event 
            alert("Last action cancelled...!"); 
        } 
    }  
</script> 

Hope this helps,
Shinu.

Tags
Grid
Asked by
Mihir Pathak
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or