How do I hide Group Headings?

13 posts, 0 answers
  1. Howard
    Howard avatar
    5 posts
    Member since:
    Aug 2009

    Posted 19 Aug 2015 Link to this post

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

    I am using 2015 Q2.

     

    Thanks,

    Howard

  2. Dimitar
    Admin
    Dimitar avatar
    2841 posts

    Posted 20 Aug 2015 Link to this post

    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
  3. Howard
    Howard avatar
    5 posts
    Member since:
    Aug 2009

    Posted 20 Aug 2015 in reply to Dimitar Link to this post

    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 

     

  4. Dimitar
    Admin
    Dimitar avatar
    2841 posts

    Posted 25 Aug 2015 Link to this post

    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
  5. Michael
    Michael avatar
    33 posts
    Member since:
    Nov 2014

    Posted 29 Jun 2017 Link to this post

    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.

  6. Dimitar
    Admin
    Dimitar avatar
    2841 posts

    Posted 03 Jul 2017 Link to this post

    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.
  7. Nidal
    Nidal avatar
    20 posts
    Member since:
    Apr 2019

    Posted 24 Apr 2019 Link to this post

    how to remove the arrow in radlistview telerik winform
  8. Dimitar
    Admin
    Dimitar avatar
    2841 posts

    Posted 24 Apr 2019 Link to this post

    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.
  9. Nidal
    Nidal avatar
    20 posts
    Member since:
    Apr 2019

    Posted 24 Apr 2019 in reply to Dimitar Link to this post

    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 
  10. Nidal
    Nidal avatar
    20 posts
    Member since:
    Apr 2019

    Posted 24 Apr 2019 Link to this post

    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 
  11. Dimitar
    Admin
    Dimitar avatar
    2841 posts

    Posted 25 Apr 2019 Link to this post

    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.
  12. Nidal
    Nidal avatar
    20 posts
    Member since:
    Apr 2019

    Posted 25 Apr 2019 in reply to Dimitar Link to this post

    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 .
  13. Dimitar
    Admin
    Dimitar avatar
    2841 posts

    Posted 25 Apr 2019 Link to this post

    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.
Back to Top