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

How to get Group Header Text in Radgrid OnGroupCollapsing Event

4 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prab
Top achievements
Rank 1
Prab asked on 28 Sep 2012, 09:57 AM
i want to get Group Header Text in Radgrid OnGroupCollapsing Event...i got header text in  server side event but i want in client side .so please help me.

4 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 02 Oct 2012, 04:15 PM
Hello Prabhakaran,

Could you please try the following approach?
  mark-up:
<telerik:RadGrid ... onmouseup="gridClicked(this,event)">
   <ClientSettings AllowDragToGroup="True">
       <ClientEvents OnGroupCollapsing="groupCollapsing" />
          ...
  JavaScript:
var text = "";
function gridClicked(grid, event) {
    if (event.target.className == "rgCollapse") {
        text = event.target.parentElement.nextElementSibling.textContent;
    }
}
function groupCollapsing(sender, args) {
    alert(text + " collapsing");
}

I hope this will prove helpful. Please give it a try and let me know about the result.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prab
Top achievements
Rank 1
answered on 03 Oct 2012, 05:15 AM
Thank you so much...
0
Warren
Top achievements
Rank 1
answered on 26 Apr 2014, 03:25 AM
How do you get the header text of a group on the server side when you click it?

Thanks!
0
Eyup
Telerik team
answered on 30 Apr 2014, 08:13 AM
Hello Warren,

I have created a sample RadGrid web site to demonstrate how you can achieve the requested functionality. Please run the attached sample and let me know if it helps you.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Prab
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Prab
Top achievements
Rank 1
Warren
Top achievements
Rank 1
Share this question
or