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

                                    In order to programmatically disable selection of rows by user, I am using the solution offered by CQ18813 (by setting DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled to False in grid's mouse up and mouse down events).

                                    Everything seems to be fine except that the user is unable to resize columns when the row selection has been disabled as above. I need to allow user to resize columns and scroll rows when the grid is disabled.

                                    Any solution?

                                    Thanks.

                                    Asad

                                0

                                Hello Asad,

                                You should determine what visual element is under the mouse cursor and lock default MouseDown event processing if it is not a column edge:

                                	
                                [C#]
                                private void gridControl1_MouseDown(object sender, MouseEventArgs e){ GridView view = gridControl1.GetViewAt(e.Location) as GridView; GridHitInfo hi = view.CalcHitInfo(e.Location) ; Text = hi.HitTest.ToString(); if (hi.HitTest != GridHitTest.ColumnEdge) (e as DevExpress.Utils.DXMouseEventArgs).Handled = true; }

                                See also: Hit Information Overview

                                Thank you,
                                Paul

                                To start a chat you should create a support ticket


                                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