Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hello I would like to find a way to show a context menu on group row on table view.
                                    I would like to operate on all rows from the selected group.
                                    I tried the selection changed event which does not work. Is there another option?


                                • Hi,

                                  By default, the GridControl shows the context menu only for usual rows. Also, your scenario is not clear to me. Please explain the behavior which you wish to implement in greater detail. It will help me to provide you with the best solution. I am looking forward to your response.

                                • Andrei Isac 03.12.2013

                                  I have a table showing computer entries id, name, location, etc.
                                  I want to group by location and right click the group row and choose for example to select all rows in the group for some action.


                                1 Solution

                                Creation Date Rating Importance Sort by

                                Hi Andrei,

                                Thank you for the clarification. At the moment, the simplest way to achieve this goal is to override the GridViewBase.GroupRowStyle style and set the BarManager.DXContextMenu property there.
                                For example:

                                <dxg:TableView x:Name="view"> <dxg:TableView.GroupRowStyle> <Style TargetType="dxg:GroupGridRowContent"> <Setter Property="dxb:BarManager.DXContextMenu"> <Setter.Value> <dxb:PopupMenuInfo> <dxb:BarButtonItemLink BarItemName="item1"/> <dxb:BarButtonItemLink BarItemName="item2"/> </dxb:PopupMenuInfo> </Setter.Value> </Setter> </Style> </dxg:TableView.GroupRowStyle> </dxg:TableView>

                                In the meantime, we agree that it makes sense to provide this functionality out-of-the-box and will consider implementing it when planning features for further releases. You can add the DXGrid - Provide a built-in context menu for group rows thread to your favorites to be notified when this feature is available.


                                • Andrei Isac 03.12.2013

                                  Thanks a lot for the solution provided.
                                  I would like to ask what is the correct way to retrieve the group row which was last selected.
                                  For some reason FocusedRrowxhanged event does not work.


                                • Andrei Isac 03.12.2013

                                  Hello again,

                                  Just to update the above question I used CalcHitInfo and stored hi.RowHandle in a member variable. Thus I can loop over child items processing them with the action selected by the popup menu.

                                  Thanks again,

                                • Hi Andrei,

                                  You can access the GroupRowData object via the e.Link.LinkControl property in the following manner:

                                  private void item_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { BarPopupBorderControl barPopupBorderControl = LayoutHelper.FindParentObject<BarPopupBorderControl>(e.Link.LinkControl); PopupMenu popupMenu = barPopupBorderControl.Parent as PopupMenu; GroupGridRowContent groupGridRowContent = popupMenu.PlacementTarget as GroupGridRowContent; GroupRowData groupRowData = groupGridRowContent.DataContext as GroupRowData; // ... }

                                  Let me know if you need further assistance.


                                • Andrei Isac 03.13.2013


                                  Thanks for the provided solution.
                                  It works better than the CalcHitInfo method.


                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners