Current filter:
                                You should refresh the page.
                                Support Center
                                0

                                The example demonstrates how to implement showing/hiding ASPxGridView columns in the manner similar to ASPxPivotGrid. To accomplish this, perform the following steps:

                                1. Place the ASPxPopupMenu control on a page. Add two items with such names as "HideColumn" and "ShowHideList".

                                2. Handle the client-side ASPxClientGridView.ContextMenu event. Show a popup menu if a user clicks on the grid's header.

                                3. Handle the client-side ASPxClientPopupMenu.ItemClick event. Check on which item the user has clicked and perform proper manipulations. If an item's name is "HideColumn", perform a grid's callback via the ASPxClientGridView.PerformCallback method and pass the required column name. In the ASPxGridView.CustomCallback event handler hide a column whose name we can get using e.Parameters. If an item's name is "ShowHideList", show or hide the grid's CustomizationWindow.

                                See also:
                                How to show/hide grid columns via ASPxPopupMenu (client-side version)
                                How to show/hide grid columns via ASPxPopupMenu

                                You must  log in  or  register  to leave comments
                                Show Implementation Details
                                Select file
                                • Default.aspx
                                • Default.aspx.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2013 vol 1.4 - v2014 vol 1.5
                                • v2011 vol 2.8 - v2012 vol 2.17

                                If you need additional product information, write to us at info@devexpress.com 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, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

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