Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello there,
                                      Is it possible to add controls like checkbox, buttons to gridview column header?

                                0

                                Hi Buyanjargal,

                                Column headers are not controls, so they cannot be parents for other controls. So, the solution is to paint controls manually via the CustomDrawColumnHeader event. The Multiple selection using checkbox (web style) example illustrates how this can be implemented.
                                If you need any further assistance on this subject, please feel free to reactivate this ticket.

                                Thanks
                                Dimitros

                                0

                                Hello again,
                                   Thank you for your response and demo project. Is it possible to know mouse pointer is in header image or header caption in hitinfo.

                                0

                                Hi Buyanjargal,

                                Thank you for the feedback.

                                As far as I understand your task, you want to determine whether the mouse pointer is hovering over the column header with a check box. If so, all you need to accomplish this task is to get the GridColumn.FieldName property value and compare it with "CheckMarkSelection" (Multiple selection using checkbox (web style)):

                                [C#]
                                private void gridView1_MouseMove(object sender, MouseEventArgs e) { GridView view = sender as GridView; GridHitInfo hitInfo = view.CalcHitInfo(e.Location); if (hitInfo.InColumn && hitInfo.Column.FieldName == "CheckMarkSelection") { // your code here } }
                                Please try this approach.
                                If your task is different, please explain it in greater detail (if possible, send a screenshot, illustrating what you are looking for). It will allow me to help you faster.
                                  
                                Thanks,
                                Svetlana

                                0

                                Hello again,
                                   Thank you for your faster response and sorry for my English, My task is:
                                    1. I`ve added image to my grid column header. /say like checkbox/
                                    2. On click event I want to know mouse clicked either on check box neither on column header.
                                        - if on check box I want to do some action instead sorting
                                        - if on column header sort action wiil be done as working right now

                                0

                                Hello again,
                                   Thank you for your faster response and sorry for my English, My task is:
                                    1. I`ve added image to my grid column header. /say like checkbox/
                                    2. On click event I want to know mouse clicked whether on check box or on column header.
                                        - if on check box I want to do some action instead sorting
                                        - if on column header sort action wiil be done as working right now

                                0

                                Hi Buyanjargal,

                                Thank you for the additional clarification. It was very useful.

                                To determine the column glyph's rectangle, use the CheckEditViewInfo.CheckInfo.GlyphRect property. Check whether the mouse pointer belongs to the glyph's rectangle in the GridView.MouseDown event handler. If so, perform appropriate actions, and set the DXMouseEventArgs.Handled property to true to prevent default handling in this event handler.

                                I've modified the Multiple selection using checkbox (web style) example accordingly to illustrate how it can be done. Please review the attached project, and let me know if this solution makes sense.

                                Thanks,
                                Svetlana

                                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