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

Need to handle select of GridFooter row

1 Answer 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
neebs
Top achievements
Rank 2
neebs asked on 05 Jan 2010, 03:38 AM
I have a grouped grid that pops up a detail view in a RadWindow when a row is selected. I would also like to display something when the group footer is selected, but it doesn't appear that Group Footers can be selected. Is there a way to do this?

Thanks, Steve

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jan 2010, 05:27 AM
Hi Steve,

You can add the onclick attribute to GroupFooter in order to fire client event when clicking GroupFooter. Here is the example that I tried.

CS:
 
 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridGroupFooterItem) 
        { 
            GridGroupFooterItem footerItem = (GridGroupFooterItem)e.Item; 
            //string groupI =  footerItem.GroupIndex; 
            footerItem.Attributes.Add("onclick""callFunction('GroupFooter clicked')"); 
        } 
    } 

JavaScript:
 
<script type="text/javascript"
    function callFunction(text) { 
        alert(text); 
    } 
</script> 

-Shinu.
Tags
Grid
Asked by
neebs
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or