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

                                    I have a GridControl and the data has row grouping enabled on the values in one column. I would like the groups to be shown at all times and distinct from the data rows. So far I have managed to expand all groups using : AutoExpandAllGroups="True". I have also prevented the user from collapsing the groups in the GroupRowCollapsing event.

                                    What I am struggling with is working out how to use your complex templates to modify some of the items in the group row.

                                    If you look at the attached image I would like to (if possible) :

                                    1. Remove the collapse button (not essential, but it has no use as I prevent this).

                                    2. I would like to remove the column name "Group :". So in the group shown it would just have the text "Action Required"!.

                                    3. Most of all I would like to change the group background color to something that makes it stand out more (it is currently using theme Seven).

                                    Im sure its just a case of using the GridViewBase.GroupRowTemplate but these templates could really do with some good examples in the manual.

                                    Thank you

                                0

                                Hi Stephen,

                                To accomplish this task, do the following:

                                1) Define the GroupRowTemplate and modify the visibility of the GridGroupExpandButton element (or simply comment it).
                                2) Write a custom value converter that returns the necessary portion of the GridGroupValueData and use this converter in the binding expression for the GroupValueContentPresenter's Content property.
                                3) Define the TableView's GroupRowStyle property and assign your own template, to be able to modify the group row's background color.

                                I am attaching a small sample project that demonstrates how to implement this functionality. Please try it on your side and let us know how it goes.

                                Thanks,
                                Vito

                                0

                                That is excellent, just what I was after.

                                May I ask how I can find these XAML template definitions for myself in future as I do not know where they are ? I have found the 'Grid Elements That Support Templates' topic in the manual but not sure then how to find the XAML to use.

                                Also is this XAML fixed between versions, or do I need to check this on DevExpress version updates ?

                                Thank you

                                0

                                Hi Stephen,

                                Thank you for contacting us. You can use our Theme Editor for WPF tool to find a resource for a specific element. Just open a required theme, hold down the Shift key, and click a necessary element to locate it and open the appropriate file in the XAML Editor. You can even make some changes in XAML and preview the result.

                                We are trying to introduce as less changes in XAML as possible, but sometimes it is required. That is why it may be necessary to update your templates after updating our components.

                                Thanks
                                Dimitros

                                0

                                Hi Vito,

                                Thank you for this. As I have not worked in WPF I had no idea there was a Theme Editor for WPF tool that could be used with Silverlight. I will check this out in future.

                                Thank you

                                0

                                Hi Stephen,

                                At this moment the Theme Editor tool supports WPF themes only. But our WPF and Silverlight controls are very similar.
                                Another way to find a required template is to research our theme sources directly in the C:\Program Files (x86)\DevExpress 2011.2\Components\Sources\DevExpress.Xpf.Themes.SL folder.

                                Thanks
                                Dimitros

                                0

                                Thank you

                                0

                                Hello,

                                Sorry to re-open this but I have found the group name change using the GroupValueConverter converter does not work all the time. This works fine for the first groups that are on screen, and some of the following ones off screen, but not all of them. The converter just does not fire for some of the groups, and the group names start repeating.

                                I have modified the project (attached) to show this. I have added ShowGroupedColumns="True" to highlight the issue and increased the data so more is off screen (90 iterations and 10 groups). As you will see in the attached video the first five group names are correct and match that in the group column. However then the group names start to repeat and no longer match the group name column data.

                                Thank you

                                0

                                Hi Stephen,

                                Try to bind directly to the GroupValue.Value property:

                                [XAML]
                                <dxg:GroupValueContentPresenter Content="{Binding Path=GroupValue.Value, Converter={StaticResource GroupValueConverter}}" ContentTemplateSelector="{Binding Path=Content.Column.ActualGroupValueTemplateSelector, RelativeSource={RelativeSource Self}}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,2,20,2"> </dxg:GroupValueContentPresenter>

                                This should help. I have attached an updated project that appears to operate fine.

                                Thanks
                                Dimitros

                                0

                                Hi Dimitros,

                                Sorry for slow reply. This works perfectly and removes the issue I had.

                                Thank you

                                0

                                You're welcome, Stephen. Please feel free to contact us in case of any difficulty. We are happy to help you at any time.

                                Dimitros

                                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