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

How do I hide Group Headings?

12 Answers 421 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Howard
Top achievements
Rank 1
Howard asked on 19 Aug 2015, 09:31 PM

How do I hide group row headings (see attached image) without affecting the group footers?

I am using 2015 Q2.

 

Thanks,

Howard

12 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Aug 2015, 10:00 AM
Hi Howard,

Thank you for writing.

You can use the ViewCellFormatting event and remove the text:
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
    if (e.Row is GridViewGroupRowInfo)
    {
        e.CellElement.Text = "";
    }
}

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
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
Howard
Top achievements
Rank 1
answered on 20 Aug 2015, 03:38 PM

That did not work. All it did was to wipe out the text. I don't want the rows to appear.

I tried e.Height = 0, but that didn't work either.

In previous versions (prior to 2015 Q2) radGridView1.TableElement.GroupHeaderHeight = 0;

Howard 

 

0
Dimitar
Telerik team
answered on 25 Aug 2015, 06:58 AM
Hello Howard,

Thank you for writing back.

I have tested this locally and the rows are hidden when the GroupHeaderHeight is set to 0. I have tested this with the latest and the Q1 2015 SP1 versions and the results are the same. This is why I have attached my test project. Could you please check it and let me know how it differs from your real setup? 

In addition could you please specify which previous version you have used?

Thank you in advance for your patience and cooperation. 
 
Regards,
Dimitar
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
Michael
Top achievements
Rank 1
answered on 29 Jun 2017, 08:02 PM

Hello,

I have a RadGridView and I'm filtering by making rows not Visible based on checkboxes from another control.  This works fine until you drag column header to group.  RadGridView shows row headers when there is actually nothing to see when you expand because rows are hidden.  I'm trying to use the GroupSummaryEvaluate event to hide the GroupRow if there are no visible rows

int visibleRowCount = 0;
foreach (GridViewRowInfo row in e.Group)
{
    if (row.IsVisible)
        visibleRowCount++;
}
if (visibleRowCount == 0)
    e.Group.GroupRow.IsVisible = false;
else
    e.Group.GroupRow.IsVisible = true;

 

This is sort of working, but i still see GroupRows until i click the down arrow on one of them and then they all vanish, except the ones that actually have visible rows.  Am I doing this wrong?  Is there a better way?  

A secondary problem occurs when you click a filter to add rows back (make then IsVisible = true) in that the group header doesn't come back for visible rows, until the control is ungrouped, then regrouped.  Hope this makes sense.  Thanks.

0
Dimitar
Telerik team
answered on 03 Jul 2017, 08:16 AM
Hi Michael,

You need to hide/show the group rows each time when the filtering or grouping are changed. For example, you can use the FilterChanged or GroupByChanged events. Here is how you can get the group rows:
foreach (var item in radGridView1.ChildRows)
{
    if (item is GridViewGroupRowInfo)
    {
        var groupRow = item as GridViewGroupRowInfo;
        if (!groupRow.ChildRows.Where(x => x.IsVisible == true).Any())
        {
            groupRow.IsVisible = false;
 
        }
        else
        {
            groupRow.IsVisible = true;
        }
    }
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Nidal
Top achievements
Rank 1
answered on 24 Apr 2019, 11:12 AM
how to remove the arrow in radlistview telerik winform
0
Dimitar
Telerik team
answered on 24 Apr 2019, 11:39 AM
Hi Nidal,

You can use the VisualItemFormatting event for this:
private void RadListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
{
    var groupItem = e.VisualItem as SimpleListViewGroupVisualItem;
    if (groupItem != null)
    {
        groupItem.ToggleElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
    }
}

I hope this helps. Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 24 Apr 2019, 01:38 PM
thank you dear dimitar , I need to expand the group collection on only one click and change the mouse over color of items and group 
0
Nidal
Top achievements
Rank 1
answered on 24 Apr 2019, 03:23 PM
dear dimitar I have the the the following list view by radlistview how i can make it collapsible (hamburger menu) like the menu in black and orange 
0
Dimitar
Telerik team
answered on 25 Apr 2019, 06:41 AM
Hi Nidal,

You can use the MouseDown event to expand/collapse the group on a single click:
private void RadListView1_MouseDown(object sender, MouseEventArgs e)
{
    var group = radListView1.ElementTree.GetElementAtPoint(e.Location) as SimpleListViewGroupVisualItem;
    if (group != null)
    {
        var dataItem = group.Data as ListViewDataItemGroup;
        dataItem.Expanded = !dataItem.Expanded;
    }
}

The hover colors can be changed by editing the theme in Visual Style Builder, detailed information is available in the following articles:
The attached image shows where you can find the hover colors. 

We have other control that allows creating such menus: Navigation View.

I hope this helps. Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 25 Apr 2019, 06:50 AM
Welcome dimitar thank you for your replay , the navigation view dosn't have expanded list in my case I need expanded list view inside the collapsible panel .
0
Dimitar
Telerik team
answered on 25 Apr 2019, 12:12 PM
Hi Nidal,

Yes the items in navigation view do not support grouping. However you can add your existing RadListView to a Panel and change its width. I have attached a project that shows how this can be implemented. 

Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Howard
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Howard
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Nidal
Top achievements
Rank 1
Share this question
or