Remove indenting of detail tables

3 posts, 0 answers
  1. ToltingColtAcres
    ToltingColtAcres avatar
    83 posts
    Member since:
    Nov 2010

    Posted 30 Oct 2015 Link to this post

    I have a series of detail tables (3 deep) within a radgrid.

    I have defined HierarchyDefaultExpanded="true" to automatically expand all the detail grids.

    Screen real-estate is at a premium. I wish to remove the expand/collapse column, and prevent the detail grids from indenting.

    I have attempted to use CSS to defined a left-margin of 0px. I have attempted to replace the default images w/ very small GIFs. I've tried about every solution I've been able to google, but nothing appears to work.

    The best I can do is "hide" the column, but, when I do that, the child grids are then indented by one column of its parent grid, which is even worse in terms of real estate.

     How can I remove the expand/collapse column completely, and make it so the master/child grids are all left-justified to the left-most side of the window?

  2. ToltingColtAcres
    ToltingColtAcres avatar
    83 posts
    Member since:
    Nov 2010

    Posted 30 Oct 2015 in reply to ToltingColtAcres Link to this post

    It appears when you use a Expand/Collapse column, code is generated to automatically add a width style to the column which sets it to 20 pixels:

    <table class="rgMasterTable" border="0" id="ctl00_body_RadGrid_Batch_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">
        <colgroup>
            <col style="width:20px" />   <--- The Expand/Collapse Column
            <col  />
            <col  />
            <col  />
        </colgroup>
    <thead>
    ...etc

    is there a CSS definition to override this behavior?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ToltingColtAcres
    ToltingColtAcres avatar
    83 posts
    Member since:
    Nov 2010

    Posted 30 Oct 2015 Link to this post

    Figured it out.

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