Need to handle select of GridFooter row

2 posts, 0 answers
  1. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 04 Jan 2010 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Jan 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top