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

[Solved] RadGridView Grouped Row Selected Event

4 Answers 384 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 07 Sep 2010, 07:28 PM
Is there an event that is fired when a user selects a grouped row? I need to update a report outside the grid that shows summary information specific to a selected grouped row. I searched through all available events and even tried to modify the GroupRowStyle template with no success.

I appreciate all your help.

4 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 08 Sep 2010, 11:27 AM
Hello Paul,

Could you clarify a bit? Which row should be considered as select? A group that has its header clicked or any group that has just been expanded?


Kind regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Paul
Top achievements
Rank 1
answered on 08 Sep 2010, 01:52 PM

Thank you for your reply.

I need to know when the Group Row is selected. In my case, when the row is clicked by the user -- selected -- the group row expands to show the underlying records. To clarify, the group row is the row which has the group expander and group aggregates as defined at the bottom of this page http://www.telerik.com/help/silverlight/gridview-visual-structure.html. I need to know when the user selects the row and some indication as to what aggregates are a part of that grouping.

Thank you for your time.

0
Milan
Telerik team
answered on 14 Sep 2010, 08:36 AM
Hi Paul,

We currently do not have events that signal which is the selected group but most probably we will such events in the near future. In the mean time you can use the following workaround:

public MainPage()
{
    InitializeComponent();
  
    this.playersGrid.AddHandler(FrameworkElement.MouseLeftButtonDownEvent, new
        MouseButtonEventHandler(OnGridMouseDown), true);
}
  
private void OnGridMouseDown(object sender, MouseButtonEventArgs e)
{
    if (this.playersGrid.IsGrouping)
    {
        var senderElement = e.OriginalSource as FrameworkElement;
        var parentRow = senderElement.ParentOfType<GridViewRow>();
        var parentGroupRow = senderElement.ParentOfType<GridViewGroupRow>();
  
        // gorup header was clicked
        if (parentRow == null && parentGroupRow != null)
        {
            // provides information line AggregateResults, etc
            //parentGroupRow.GroupViewModel;
        }
    }
}

You can also vote for this feature request which is about adding Group Expanded / GroupCollaped events to RadGridView.

Regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Milan
Telerik team
answered on 14 Sep 2010, 08:37 AM
Hi Paul,

Here is the link.


Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Paul
Top achievements
Rank 1
Answers by
Milan
Telerik team
Paul
Top achievements
Rank 1
Share this question
or