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

AllowDragToGroup Client event

1 Answer 132 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vikas
Top achievements
Rank 1
Vikas asked on 21 Jun 2011, 11:57 AM
Hi,

I am using AllowDragToGroup = true. If RadGrid contains thousands of record. so grouping take lot much time. I want to give a alert message and cancel Drap and drop operation if User tries to drag any column in such condition.

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 23 Jun 2011, 11:16 AM
Hi Vikas,

You could try handling the OnCommand client event, show message and cancel the operation if the command name is GroupByColumn. For example:
<telerik:RadGrid runat="server" ShowGroupPanel="true" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="true" ID="RadGrid1">
        <MasterTableView>
            <Columns>
                ...
            </Columns>
        </MasterTableView>
        <ClientSettings AllowDragToGroup="true">
            <ClientEvents OnCommand="OnCommand" />
        </ClientSettings>
    </telerik:RadGrid>
<telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            function OnCommand(sender, eventArgs)
            {
                if(eventArgs.get_commandName() == "GroupByColumn")
                {
                    alert("Message");
                    eventArgs.set_cancel(true);
                }
            }
        </script>
    </telerik:RadCodeBlock>

I hope this helps.

Greetings,
Radoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Vikas
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or