Current filter:
                                You should refresh the page.
                                  • Hello,

                                    i want add custom button to datagrid search panel. I found suitable solution in Devexpress support center at .
                                    I slightly modify Views\GridView.xaml file to do not show group panel and to make custom button little bit smaller. Original lines are commented. Everything work well except one visual issue. See attached image Gridserach.png. As you can see grid column header border is missing below custom button.Could you help me solve this small issue?

                                    Maroš Klempa

                                • Maros Klempa 01.13.2020

                                  Attached sample project which demonstrate this issue.

                                • Alexey Z (DevExpress Support) 01.13.2020

                                  Hello Maroš,

                                  Thank you for the clarification. Before I provide you with a solution for your current approach, I would like to note that our GridControl already provides a way to display the Find button in the Search Panel. Set the ShowSearchPanelFindButton property to True. Also, set the SearchPanelFindMode property to FindMode.FindClick to make your GridControl start searching for data when a user clicks the Find button. Does this approach meet your requirements?

                                • Maros Klempa 01.13.2020

                                  Hello Alexej,

                                  I plan add to search panel more than one button. And in future maybe another controls. So show Find button is not enough for me.

                                1 Solution

                                Creation Date Importance Sort by

                                Starting with version 19.1, our GridControl uses a new Search Panel. The approach from the T431191 thread is for our older Search Panel. To accomplish this task in version 19.2, use the approach we demonstrated in the following thread: Change control template of gridcontrol header. Please refer to it for more details.


                                Show all comments
                                • Maros Klempa 01.15.2020

                                  Hello Kirill,

                                  I tested new approach demonstrated in Change control template of gridcontrol header thread, as you proposed me. I found that it behavior is the same as with older Search Panel. Also in new approach thin line over grid header is missing. I analyzed it deeply and I found that there is a small difference. Because in real application I use DX themes I want to be sure that Search Panel will follow selected theme. Thus I do not use ThemeName=Office2016White in template, but I use IsThemeIndependent=True.
                                  See attached project. It contain template from proposed thread but with IsThemeIndependent=True. When you run project, the thin line is missing. What I should do to fix this visual issue?

                                • Dima (DevExpress Support) 01.15.2020

                                  Hello Maros,

                                  Thank you for the update. I checked your sample and see what you are talking about. The main reason why the issue occurs is that our controls cannot locate resources with definitions similar to the following:

                                  {DynamicResource {dxgt:TableViewThemeKey ResourceKey=HeaderMargin, IsThemeIndependent=True}}

                                  The IsThemeIndependent option cannot be used for this purpose. We have a separate extension class that you can use to accomplish this task - see How to use the ThemeResource extension to load resources from DevExpress themes dynamically. So, such resources can be defined in the following manner:

                                  {dxci:ThemeResource {dxgt:TableViewThemeKey ResourceKey=HeaderMargin}}

                                  I see that you project works fine if I change all problematic resources in this manner. Please try this approach and let me know your result.

                                • Maros Klempa 01.15.2020

                                  Hello Dimitrij,

                                  so if I right understand it I have to remove all IsThemeIndependent=True option from XAML  Am I right?

                                • Dima (DevExpress Support) 01.15.2020

                                  Not entirely, Maros. The main idea is to use ThemeResource instead of DynamicResource when you wish to load theme resources dynamically and change them on the fly. This extension does not require the IsThemeIndependent property to work, so it should be removed.

                                  Let me know if you have any additional questions.

                                • Maros Klempa 01.16.2020

                                  Hello Dmitrij,

                                  excuse me, I am still beginner in WPF/XAML development so for me it is difficult to understand your proposal. Could you please to modify my attached sample project to accomplish my targets.

                                  1. two custom buttons in search panel
                                  2. search panel have to follow application theme, so when user change theme search panel colors should change accordingly
                                  3. thin line above datagrid column header should not be missing
                                • Alexey Z (DevExpress Support) 01.16.2020


                                  I changed all your DynamicResources to ThemeResource as my colleague Dima mentioned in his previous comment and the application now complies with all your requirements. Attached is the modified sample. Please try it and let me know your results.

                                • Maros Klempa 01.17.2020

                                  Hello Alexej, Dmitrij and Kirill,

                                  thanks a lot for your effort and help. Now Search Panel works exactly as I needed. We can close this issue.

                                  Best regards

                                • Alexey Z (DevExpress Support) 01.17.2020

                                  Hello Maroš,

                                  Thank you for informing us that the issue has been resolved. Feel free to contact us in case of any questions.