hide the expand collapse column in radgrid

10 posts, 0 answers
  1. Allen
    Allen avatar
    49 posts
    Member since:
    Oct 2012

    Posted 02 May 2013 Link to this post

    Hi
        How to hide  the expand collapse column in radgrid. I have set hierarchydefaultexpand to true. I dont want to collapse the expanded rows.
    thanks
    Allen
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 May 2013 Link to this post

    Hi,

    Please try the following CSS.

    CSS:
    <style type="text/css">
    .rgExpandCol {
       display:none !important;
    }
    </style>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kerry
    Kerry avatar
    25 posts
    Member since:
    Jun 2013

    Posted 19 Jul 2013 Link to this post

    This ALMOST works for me. The header and main body column is gone, but my filter row still has the column. So I end up with the attached image.
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 Jul 2013 Link to this post

    Hi Kerry,

    Please try the following CSS code snippet to achieve your scenario.

    CSS:
    <style type="text/css">
     .rgExpand, .rgCollapse
      {
        display: none;
      }
    </style>

    Hope this helps.

    Thanks,
    Princy
  6. Kerry
    Kerry avatar
    25 posts
    Member since:
    Jun 2013

    Posted 22 Jul 2013 Link to this post

    That actually ended up doing nothing for me.

    I DID, however, locate a solution FOR ME. My situation is that I simply do NOT want to see the expand/collapse column EVER. For some odd reason, my non-hierarchical records are showing up with Expand column on load. Upon postback, the column disappears.

    My solution can be done in either the apsx page or in the codebehind.

    apsx:
    <MasterTableView ExpandCollapseColumn-Visible="false">


    Codebehind (VB):
    RadGrid.MasterTableView.ExpandCollapseColumn.Visible = False

  7. BestCoder
    BestCoder avatar
    3 posts
    Member since:
    Feb 2014

    Posted 26 Mar 2014 in reply to Kerry Link to this post

    Your post was uber-helpful. But how did learn about this property? It doesn't appear in intellisense.

         ExpandCollapseColumn-Visible="false"The property

    Wondering why this doesn't appear in the Telerik documentation for the radGrid. The only mention of this property is this:

    "The property setter does nothing and should not be used. It works around a bug in the VS.NET designer."

    Danny
  8. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Mar 2014 in reply to BestCoder Link to this post

    Hi,

    You can get this from intellisense of  the Telerik:Radgrid tag.

    ASPX:
    <telerik:RadGrid ID="RadGrid1" runat="server"
    MasterTableView-ExpandCollapseColumn-Display
    ="false">

    Thanks,
    Princy
  9. Manish
    Manish avatar
    1 posts
    Member since:
    Sep 2015

    Posted 30 Sep 2015 in reply to Kerry Link to this post

     It was quite helpful. 

    Thanks Kerry

     

     

  10. Johnathan
    Johnathan avatar
    31 posts
    Member since:
    Sep 2012

    Posted 08 Oct 2015 Link to this post

    Hi Kerry,

     I'm not sure why this is, but the expandcollapsecolumn option doesn't work for me (I can set the visible property to false, but the expand/collapse column still appears). I was able to create a CSS workaround for those who may have the same issue:

    #<%=RadGrid1.ClientID%> .rgGroupCol { display:none !important;}

    Thanks,

     Johnathan Beam

  11. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 13 Oct 2015 Link to this post

    Hello Johnathan,

    You can also hide the column on code-behind:
    http://www.telerik.com/forums/hide-group-expand-collapse-columns-in-radgrid#gwiwEE8eFkuo43JFSlSlZw

    Hope this helps.

    Regards,
    Eyup
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017