This is a migrated thread and some comments may be shown as answers.

How to hide Grouping Panel in DataGrid?

3 Answers 186 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Vijay
Top achievements
Rank 1
Vijay asked on 22 Oct 2017, 05:27 PM
In WPF I can set ShowGroupPanel="false" but I can't find ShowGroupPanel property in UWP. So how can I hide Grouping Panel?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 25 Oct 2017, 08:32 AM
Hello Vijay,

In order to hide the UI grouping of the DataGrid you can simply set the UserGroupMode property of the DataGrid to Disabled.

Hope this helps.

Regards,
Nasko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Vijay
Top achievements
Rank 1
answered on 25 Oct 2017, 09:29 AM

Setting UserGroupMode property as Disabled completely removed the functionality of Grouping. I want to hide GroupPanel but I don't want to completely remove the functionality of Grouping.

 

Also, setting UserGroupMode=Disabled didn't remove  text from flyout. Is it a bug?

 

0
Stefan Nenchev
Telerik team
answered on 27 Oct 2017, 12:19 PM
Hi, Vijay,

You can find the Group Panel visual element and hide it on the load of the RadDataGrid:

private void DataGrid_Loaded(object sender, RoutedEventArgs e)
       {
          var servicePanel = ElementTreeHelper.EnumVisualDescendants(this.DataGrid, a => a.GetType() == typeof(DataGridServicePanel)).FirstOrDefault();
           if (servicePanel != null)
           {
               servicePanel.SetValue(DataGridServicePanel.VisibilityProperty, Visibility.Collapsed);
           }
       }

I have attached a sample for your reference.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
Vijay
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Vijay
Top achievements
Rank 1
Stefan Nenchev
Telerik team
Share this question
or